From b7fc1981f79182c4947e43b5cd1d40b4b0ffbec3 Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 2 May 2016 16:14:11 +0200 Subject: [PATCH] All users free to choose whether to use XDR or not. --- CMakeLists.txt | 12 +++--------- cmake_files/FindXDR.cmake | 4 +++- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d21bfa175..8e053379a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,9 +59,7 @@ OPTION(MEDCOUPLING_BUILD_STATIC "Build MEDCoupling library in static mode." OFF) CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_METIS "Enable metis graph library in MEDPartitioner." ON "MEDCOUPLING_ENABLE_PARTITIONER" OFF) CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_SCOTCH "Enable scotch graph library in MEDPartitioner." ON "MEDCOUPLING_ENABLE_PARTITIONER;NOT MEDCOUPLING_USE_MPI" OFF) CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_PARMETIS "Enable parmetis graph library in MEDPartitioner." ON "MEDCOUPLING_ENABLE_PARTITIONER;MEDCOUPLING_USE_MPI" OFF) -IF(WIN32) - CMAKE_DEPENDENT_OPTION(MEDCOUPLING_MEDLOADER_USE_XDR "Enable use of XDR for SauvReader." ON "NOT MEDCOUPLING_MICROMED" OFF) -ENDIF(WIN32) +CMAKE_DEPENDENT_OPTION(MEDCOUPLING_MEDLOADER_USE_XDR "Enable use of XDR for SauvReader." ON "NOT MEDCOUPLING_MICROMED" OFF) IF(MEDCOUPLING_BUILD_STATIC) SET(BUILD_SHARED_LIBS 0) @@ -78,13 +76,9 @@ IF(NOT MEDCOUPLING_MICROMED) FIND_PACKAGE(SalomeHDF5 REQUIRED) FIND_PACKAGE(SalomeMEDFile REQUIRED) # XDR stuff - IF(NOT WIN32) - FIND_PACKAGE(SalomeXDR REQUIRED) - ELSE(NOT WIN32) - IF(MEDCOUPLING_MEDLOADER_USE_XDR) + IF(MEDCOUPLING_MEDLOADER_USE_XDR) FIND_PACKAGE(SalomeXDR REQUIRED) - ENDIF(MEDCOUPLING_MEDLOADER_USE_XDR) - ENDIF(NOT WIN32) + ENDIF(MEDCOUPLING_MEDLOADER_USE_XDR) # End of XDR Stuff IF(MEDCOUPLING_ENABLE_PARTITIONER) FIND_PACKAGE(SalomeLibXml2) diff --git a/cmake_files/FindXDR.cmake b/cmake_files/FindXDR.cmake index dc93cac11..e8e862531 100644 --- a/cmake_files/FindXDR.cmake +++ b/cmake_files/FindXDR.cmake @@ -20,7 +20,9 @@ MESSAGE(STATUS "Check for XDR ...") FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h) -SET(XDR_DEFINITIONS "-DHAS_XDR") +IF(XDR_INCLUDE_DIRS) + SET(XDR_DEFINITIONS "-DHAS_XDR") +ENDIF() IF(WIN32) FIND_LIBRARY(XDR_LIBRARIES xdr) # To get the .lib file from XDR -- 2.39.2