]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Debug of CMake build procedure
authormpa <mpa@opencascade.com>
Fri, 28 Feb 2014 12:49:33 +0000 (16:49 +0400)
committermpa <mpa@opencascade.com>
Fri, 28 Feb 2014 12:49:33 +0000 (16:49 +0400)
CMakeLists.txt
SalomePARAVISConfig.cmake.in
idl/CMakeLists.txt
src/CMakeLists.txt
src/PV_SWIG/CMakeLists.txt
src/Plugins/CMakeLists.txt

index 55b6ba2144e15ec59abf52503f4e34834c45d357..8a2ac000ac5e4a03b993b3bb81baca8dbf384011 100644 (file)
@@ -17,6 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+INCLUDE(CMakeDependentOption)
 PROJECT(SalomePARAVIS C CXX)
 
 IF(WIN32)
@@ -74,8 +75,11 @@ ENDIF()
 OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON)
 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 OPTION(SALOME_PARAVIS_ALL_TEST "Add all tests for Salome PARAVIS module" OFF)
-OPTION(SALOME_PARAVIS_MINIMAL_CORBA "Build PARAVIS with a minimal CORBA interface" OFF)
 OPTION(SALOME_PARAVIS_BUILD_PLUGINS "Build PARAVIS plugins (MEDReader, etc ...)" ON)
+CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
+                       "NOT SALOME_KERNEL_LIGHT_ONLY" ON)
+CMAKE_DEPENDENT_OPTION(SALOME_PARAVIS_MINIMAL_CORBA "Build PARAVIS with a minimal CORBA interface" OFF
+                       "NOT SALOME_LIGHT_ONLY" ON)
 
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
@@ -130,6 +134,7 @@ FIND_PACKAGE(SalomeParaView REQUIRED)
 # GUI itself has to be loaded AFTER ParaView: the ParaView config doesn't mix
 # well with the VTK one (and GUI loads VTK):
 FIND_PACKAGE(SalomeGUI REQUIRED)
+FULL_GUI(TRUE) # check whether GUI builded in full mode and with CORBA
 ADD_DEFINITIONS(${GUI_DEFINITIONS})
 INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
 
@@ -149,10 +154,11 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS)
   ELSE()
     MESSAGE(FATAL_ERROR "We absolutely need the Salome MED module to build plugins, please define MED_ROOT_DIR")
   ENDIF()
-  IF(SALOME_MED_STANDALONE)
-    MESSAGE(FATAL_ERROR "We absolutely need a Salome MED with KERNEL, please set SALOME_MED_STANDALONE=OFF in MED module
+  IF(SALOME_MED_STANDALONE OR SALOME_MED_MICROMED)
+    MESSAGE(FATAL_ERROR "We absolutely need a Salome MED with KERNEL and with MED file dependancy, 
+                         please set SALOME_MED_STANDALONE=OFF and SALOME_MED_MICROMED=OFF in MED module
                          or SALOME_PARAVIS_BUILD_PLUGINS=OFF in PARAVIS module")
-  ENDIF(SALOME_MED_STANDALONE)
+  ENDIF()
   FIND_PACKAGE(SalomeMEDFile)
   SALOME_LOG_OPTIONAL_PACKAGE(MEDFile SALOME_PARAVIS_BUILD_PLUGINS)
 ENDIF()
@@ -197,6 +203,7 @@ MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC SALOME_PARAVIS
 ## Generation of the list of VTK classes (to be wrapped into IDLs) 
 ## =====================================
 IF(NOT SALOME_LIGHT_ONLY AND NOT SALOME_PARAVIS_MINIMAL_CORBA)
+  ADD_DEFINITIONS(-DPARAVIS_WITH_FULL_CORBA)
   # TODO: the below requires ParaView in the PYTHONPATH ... not so nice:
   MESSAGE(STATUS "Generating list of wrapped VTK classes ...")
   LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0)
@@ -225,7 +232,7 @@ ADD_SUBDIRECTORY(resources)
 IF(SALOME_BUILD_DOC)
   ADD_SUBDIRECTORY(doc)
 ENDIF()
-IF(SALOME_BUILD_TESTS)
+IF(SALOME_BUILD_TESTS AND NOT SALOME_LIGHT_ONLY)
   ADD_SUBDIRECTORY(test)
 ENDIF()
 ADD_SUBDIRECTORY(bin)
@@ -242,13 +249,13 @@ INCLUDE(CMakePackageConfigHelpers)
 
 # List of targets in this project we want to make visible to the rest of the world.
 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-SET(_${PROJECT_NAME}_exposed_targets 
-    SalomeIDLPARAVIS PARAVIS PARAVISEngine
-)
+IF(NOT SALOME_LIGHT_ONLY)
+  SET(_${PROJECT_NAME}_exposed_targets SalomeIDLPARAVIS PARAVISEngine PARAVIS)
 
-# Add all targets to the build-tree export set
-EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
-  FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+  # Add all targets to the build-tree export set
+  EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
+    FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+ENDIF()
 
 # Create the configuration files:
 #   - in the build tree:
@@ -290,6 +297,8 @@ INSTALL(FILES
   "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
   DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
 
-# Install the export set for use with the install-tree
-INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" 
-        FILE ${PROJECT_NAME}Targets.cmake)
+IF(NOT SALOME_LIGHT_ONLY)
+  # Install the export set for use with the install-tree
+  INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" 
+          FILE ${PROJECT_NAME}Targets.cmake)
+ENDIF()
index bab2f29e60387e6450d155426d880a72e54361e0..823e29a382d79025759a77877c113f4f0d53bdf8 100644 (file)
@@ -50,7 +50,7 @@ SET(PARAVIS_DEFINITIONS "@GUI_DEFINITIONS@")
 # Options exported by the package:
 SET(SALOME_PARAVIS_BUILD_DOC   @SALOME_BUILD_DOC@)
 SET(SALOME_PARAVIS_BUILD_TESTS @SALOME_BUILD_TESTS@)
-SET(SALOME_LIGHT_ONLY  @SALOME_LIGHT_ONLY@)
+SET(SALOME_PARAVIS_LIGHT_ONLY  @SALOME_LIGHT_ONLY@)
 
 # Advanced options
 SET(SALOME_USE_OCCVIEWER    @SALOME_USE_OCCVIEWER@)
index 0203e5dacfe6afd2b9d4831cd2e4bafff356ee36..06019928e661f001c72e06cbf8a3d0c2a007de53 100644 (file)
@@ -33,7 +33,6 @@ IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
   # (again, this shouldn't last for long ...) 
   SET(OMNIORB_IDLCXXFLAGS "${OMNIORB_IDLCXXFLAGS};-DPARAVIS_WITH_FULL_CORBA")
   SET(OMNIORB_IDLPYFLAGS "${OMNIORB_IDLPYFLAGS};-DPARAVIS_WITH_FULL_CORBA")
-  ADD_DEFINITIONS(-DPARAVIS_WITH_FULL_CORBA)
 ENDIF()  
   ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 SET(SalomeIDLPARAVIS_IDLSOURCES
index 2debe4e853472c9e6243d925bb75a2314d51fe27..dfc879d5cb1423a64518d533e4f4304bfcc8f74c 100644 (file)
 #
 
 SET(_subdirs
-  ENGINE
-  PVGUI
   PV_SWIG
   Macro
+)
+
+IF(NOT SALOME_LIGHT_ONLY)
+  LIST(APPEND _subdirs
+    ENGINE
+    PVGUI
   )
-  
-IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
-  # Append in first position  
-  LIST(INSERT _subdirs 0 VTKWrapping)
-  ADD_DEFINITIONS(-DPARAVIS_WITH_FULL_CORBA)
-ENDIF()
+  IF(NOT SALOME_PARAVIS_MINIMAL_CORBA)
+    # Append in first position  
+    LIST(INSERT _subdirs 0 VTKWrapping)
+  ENDIF()
+ENDIF(NOT SALOME_LIGHT_ONLY)
 
 IF(SALOME_PARAVIS_BUILD_PLUGINS)
   LIST(APPEND _subdirs Plugins)
index 1b89763d723f71d8f63a43eba30f3e0c120e48ce..64fe2f88bf6f0828c3ff9ef305fc02156c5597a7 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-IF(SALOME_PARAVIS_MINIMAL_CORBA)
-  # Use another set of Python files redirecting the API directly 
-  # to the original ParaView modules.
-  SET(_PYFILES_TO_INSTALL
-    paravis.py
+SET(_PYFILES_TO_INSTALL)
+
+IF(SALOME_LIGHT_ONLY)
+  LIST(APPEND _PYFILES_TO_INSTALL
     pvsimple.py
     presentations.py
-    paravisSM.py
-  )
-ELSE()
-  SET(_PYFILES_TO_INSTALL
-    VTKWrapping/paravis.py
-    VTKWrapping/paravisSM.py
-    VTKWrapping/pvsimple.py
-    VTKWrapping/presentations.py
   )
-ENDIF()
+ELSE(SALOME_LIGHT_ONLY)
+  IF(SALOME_PARAVIS_MINIMAL_CORBA)
+    # Use another set of Python files redirecting the API directly 
+    # to the original ParaView modules.
+    LIST(APPEND _PYFILES_TO_INSTALL
+      paravis.py
+      pvsimple.py
+      presentations.py
+      paravisSM.py
+    )
+  ELSE()
+    LIST(APPEND _PYFILES_TO_INSTALL
+      VTKWrapping/paravis.py
+      VTKWrapping/paravisSM.py
+      VTKWrapping/pvsimple.py
+      VTKWrapping/presentations.py
+    )
+  ENDIF()
+ENDIF(SALOME_LIGHT_ONLY)
 
 INSTALL_AND_COMPILE_PYTHON_FILE("${_PYFILES_TO_INSTALL}" ${SALOME_INSTALL_SCRIPT_PYTHON})
index 325d8230d8b42393d437ea614f40688cb1fac449..cba2bb54415180eecec32602a90d4fdebe6eb1c9 100755 (executable)
@@ -30,13 +30,18 @@ SET(_subdirs
   #Filter 
   #ToolBar 
   MEDReader 
-  ParaMEDCorba 
   TableReader 
   NavigationMode 
   ElevationSurface
   ScaleVector
   EllipseBuilder
   )
+  
+IF(NOT SALOME_LIGHT_ONLY)
+  LIST(APPEND _subdirs
+    ParaMEDCorba 
+  )
+ENDIF()   
 
 FOREACH(_dir ${_subdirs})
   ADD_SUBDIRECTORY(${_dir})