From: bruneton Date: Tue, 17 Sep 2013 09:54:15 +0000 (+0000) Subject: CMake: reverting to the previous behaviour for optional prerequisites. X-Git-Tag: V7_3_1b1~150 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a65d0f0db5bb20142b702d2410857b06d0de7eb;p=tools%2Fmedcoupling.git CMake: reverting to the previous behaviour for optional prerequisites. If not found, we trigger the failure of the configuration. This is handled by macros SALOME_PACKAGE_REPORT_AND_CHECK and SALOME_LOG_OPTIONAL_PACKAGE, allowing a nice error message which indicates what flag should be switched off to avoid the issue. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bf211ec43..a9472f9ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,14 +115,14 @@ IF(NOT SALOME_MED_MICROMED) FIND_PACKAGE(SalomeMEDFile REQUIRED) IF(SALOME_MED_ENABLE_PARTITIONER) FIND_PACKAGE(SalomeLibXml2) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(LibXml2 SALOME_MED_ENABLE_PARTITIONER) + SALOME_LOG_OPTIONAL_PACKAGE(LibXml2 SALOME_MED_ENABLE_PARTITIONER) IF(SALOME_MED_PARTITIONER_METIS) FIND_PACKAGE(SalomeMetis) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Metis SALOME_MED_PARTITIONER_METIS) + SALOME_LOG_OPTIONAL_PACKAGE(Metis SALOME_MED_PARTITIONER_METIS) ENDIF(SALOME_MED_PARTITIONER_METIS) IF(SALOME_MED_PARTITIONER_SCOTCH) FIND_PACKAGE(SalomeScotch) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Scotch SALOME_MED_PARTITIONER_SCOTCH) + SALOME_LOG_OPTIONAL_PACKAGE(Scotch SALOME_MED_PARTITIONER_SCOTCH) ENDIF(SALOME_MED_PARTITIONER_SCOTCH) ENDIF(SALOME_MED_ENABLE_PARTITIONER) ENDIF(NOT SALOME_MED_MICROMED) @@ -147,43 +147,43 @@ ENABLE_TESTING() # let it outsite because even if SALOME_BUILD_TESTS is OFF, pyt IF(SALOME_BUILD_TESTS) FIND_PACKAGE(SalomeCppUnit) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(CppUnit SALOME_BUILD_TESTS) + SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS) ENDIF(SALOME_BUILD_TESTS) IF(SALOME_USE_MPI) FIND_PACKAGE(SalomeMPI REQUIRED) IF(SALOME_MED_PARTITIONER_PARMETIS) FIND_PACKAGE(SalomeParMetis) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(ParMetis SALOME_MED_PARTITIONER_PARMETIS) + SALOME_LOG_OPTIONAL_PACKAGE(ParMetis SALOME_MED_PARTITIONER_PARMETIS) ENDIF(SALOME_MED_PARTITIONER_PARMETIS) ENDIF(SALOME_USE_MPI) IF(SALOME_MED_ENABLE_RENUMBER) FIND_PACKAGE(SalomeBoost) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Boost SALOME_MED_ENABLE_RENUMBER) + SALOME_LOG_OPTIONAL_PACKAGE(Boost SALOME_MED_ENABLE_RENUMBER) ENDIF(SALOME_MED_ENABLE_RENUMBER) IF(SALOME_BUILD_DOC) FIND_PACKAGE(SalomeDoxygen) FIND_PACKAGE(SalomeGraphviz) FIND_PACKAGE(SalomeSphinx) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Doxygen SALOME_BUILD_DOC) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Graphviz SALOME_BUILD_DOC) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Sphinx SALOME_BUILD_DOC) + SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC) + SALOME_LOG_OPTIONAL_PACKAGE(Graphviz SALOME_BUILD_DOC) + SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC) ENDIF(SALOME_BUILD_DOC) IF(SALOME_MED_ENABLE_PYTHON) FIND_PACKAGE(SalomePython) FIND_PACKAGE(SalomeSWIG) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Python SALOME_MED_ENABLE_PYTHON) - SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(SWIG SALOME_MED_ENABLE_PYTHON) + SALOME_LOG_OPTIONAL_PACKAGE(Python SALOME_MED_ENABLE_PYTHON) + SALOME_LOG_OPTIONAL_PACKAGE(SWIG SALOME_MED_ENABLE_PYTHON) IF(NOT SALOME_MED_STANDALONE) FIND_PACKAGE(SalomeOmniORBPy REQUIRED) ENDIF(NOT SALOME_MED_STANDALONE) ENDIF(SALOME_MED_ENABLE_PYTHON) # Detection report -SALOME_PACKAGE_REPORT() +SALOME_PACKAGE_REPORT_AND_CHECK() # Directories #