]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
CMake: reverting to the previous behaviour for optional prerequisites.
authorbruneton <bruneton>
Tue, 17 Sep 2013 09:43:15 +0000 (09:43 +0000)
committerbruneton <bruneton>
Tue, 17 Sep 2013 09:43:15 +0000 (09:43 +0000)
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.

CMakeLists.txt

index 40e9ef80a2ace053d8c3cd627c1072fb4352feca..05423e4c9d548a6b16910976c905e28d81cd9538 100755 (executable)
@@ -100,15 +100,15 @@ ENDIF()
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
   FIND_PACKAGE(SalomeCppUnit)
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(CppUnit SALOME_BUILD_TESTS)  
+  SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)  
 ENDIF()
 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()
 
 ##
@@ -129,24 +129,24 @@ FIND_PACKAGE(SalomePyQt4 REQUIRED)
 # Optional prerequisites for GUI
 IF(SALOME_USE_OCCVIEWER)
   FIND_PACKAGE(SalomeCAS)
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(CAS SALOME_USE_OCCVIEWER)
+  SALOME_LOG_OPTIONAL_PACKAGE(CAS SALOME_USE_OCCVIEWER)
 ENDIF()
 IF(SALOME_USE_GLVIEWER)
   FIND_PACKAGE(SalomeOpenGL)
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(OpenGL SALOME_USE_GLVIEWER) 
+  SALOME_LOG_OPTIONAL_PACKAGE(OpenGL SALOME_USE_GLVIEWER) 
 ENDIF()
 IF(SALOME_USE_VTKVIEWER)
   # Required components are listed in the FindSalomeVTK.cmake file: 
   FIND_PACKAGE(SalomeVTK 6.0) 
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(VTK SALOME_USE_VTKVIEWER)
+  SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
 ENDIF()
 IF(SALOME_USE_PLOT2DVIEWER)
   FIND_PACKAGE(SalomeQwt)  
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(Qwt SALOME_USE_PLOT2DVIEWER)
+  SALOME_LOG_OPTIONAL_PACKAGE(Qwt SALOME_USE_PLOT2DVIEWER)
 ENDIF()
 
 # Detection summary:
-SALOME_PACKAGE_REPORT()
+SALOME_PACKAGE_REPORT_AND_CHECK()
 
 # Directories
 # (default values taken from KERNEL)