From: Anthony Geay Date: Wed, 28 Aug 2024 12:50:31 +0000 (+0200) Subject: [EDF30834] : warning hunting on cmake X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f3f584204b5f784e47c68c55c93a16d4afd8aa24;p=tools%2Fmedcoupling.git [EDF30834] : warning hunting on cmake --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c080f174a..bbc37f053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,17 +121,17 @@ CMAKE_DEPENDENT_OPTION(MEDCOUPLING_BUILD_FRENCH_DOC "Generate MEDCOUPLING French IF(MEDCOUPLING_BUILD_STATIC) SET(BUILD_SHARED_LIBS 0) SET(CMAKE_POSITION_INDEPENDENT_CODE 1) # -fPIC option -ELSE() +ELSE(MEDCOUPLING_BUILD_STATIC) SET(BUILD_SHARED_LIBS 1) -ENDIF() +ENDIF(MEDCOUPLING_BUILD_STATIC) IF(${MEDCOUPLING_PARTITIONER_PARMETIS} AND ${MEDCOUPLING_PARTITIONER_METIS}) MESSAGE(FATAL_ERROR "ParMetis and Metis are mutually exclusive! Make a choice (options MEDCOUPLING_PARTITIONER_METIS and MEDCOUPLING_PARTITIONER_PARMETIS).") -ENDIF() +ENDIF(${MEDCOUPLING_PARTITIONER_PARMETIS} AND ${MEDCOUPLING_PARTITIONER_METIS}) IF(${MEDCOUPLING_PARTITIONER_PTSCOTCH} AND ${MEDCOUPLING_PARTITIONER_SCOTCH}) MESSAGE(FATAL_ERROR "PTScotch and Scotch are mutually exclusive! Make a choice (options MEDCOUPLING_PARTITIONER_SCOTCH and MEDCOUPLING_PARTITIONER_PTSCOTCH).") -ENDIF() +ENDIF(${MEDCOUPLING_PARTITIONER_PTSCOTCH} AND ${MEDCOUPLING_PARTITIONER_SCOTCH}) # # Set list of prerequisites @@ -205,7 +205,7 @@ ENDIF(MEDCOUPLING_ENABLE_RENUMBER) IF(MEDCOUPLING_ENABLE_SHAPERECOGN) FIND_PACKAGE(BLAS REQUIRED) FIND_PACKAGE(LAPACK REQUIRED) - FIND_LIBRARY(LAPACKE_LIB NAMES lapacke REQUIRED) + FIND_LIBRARY(LAPACKE_LIB NAMES lapacke64 REQUIRED) SET(LAPACK_LIBRARIES ${LAPACKE_LIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) FIND_PATH(LAPACKE_INCLUDE_DIRS NAMES lapacke.h HINTS ${LAPACK_LIBRARIES}) IF(LAPACK_FOUND) diff --git a/src/MEDCoupling_Swig/CMakeLists.txt b/src/MEDCoupling_Swig/CMakeLists.txt index 1a99b2aa4..627b5253c 100644 --- a/src/MEDCoupling_Swig/CMakeLists.txt +++ b/src/MEDCoupling_Swig/CMakeLists.txt @@ -123,10 +123,10 @@ ENDIF() IF(WIN32 OR CYGWIN) SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcouplingcpp) -ELSE(WIN32) +ELSE(WIN32 OR CYGWIN) # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1 SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PLATFORM_LIBS} medcouplingcpp) -ENDIF(WIN32) +ENDIF(WIN32 OR CYGWIN) # ${PYTHON_LIBRARIES} not needed SWIG_CHECK_GENERATION(${MEDCouling_target_name}) SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON) @@ -160,7 +160,7 @@ IF(WIN32 OR CYGWIN) ELSE(WIN32) # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1 SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper) -ENDIF(WIN32) +ENDIF(WIN32 OR CYGWIN) IF(WIN32) SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d) diff --git a/src/PyWrapping/CMakeLists.txt b/src/PyWrapping/CMakeLists.txt index 65710dcb6..136cdd289 100644 --- a/src/PyWrapping/CMakeLists.txt +++ b/src/PyWrapping/CMakeLists.txt @@ -68,10 +68,10 @@ INCLUDE_DIRECTORIES( IF(WIN32 OR CYGWIN) SET(medcoupling_LIB_dependancies ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcouplingremapper medicoco) -ELSE(WIN32) +ELSE(WIN32 OR CYGWIN) # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1 SET(medcoupling_LIB_dependancies ${PLATFORM_LIBS} medcouplingremapper medicoco) -ENDIF(WIN32) +ENDIF(WIN32 OR CYGWIN) IF(NOT MEDCOUPLING_MICROMED) LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_MED_FILE)