Salome HOME
Merge branch 'rbe/evol-job-newparams'
[modules/kernel.git] / src / CMakeLists.txt
index 931de8be9f067cba158e98afb38f64d588c1dd3c..8ea2b8ca16509a3a4cea8894ce925a54b90ae162 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,13 +22,13 @@ SET(SUBDIR_BASE
   SALOMELocalTrace
   HDFPersist
   KERNEL_PY
+  Utils
 )
 
 SET(SUBDIR_CORBA
   DF
   Logger
   SALOMETraceCollector
-  Utils
   NamingService
   GenericObj
   Registry
@@ -43,20 +43,23 @@ SET(SUBDIR_CORBA
   LifeCycleCORBA_SWIG
   SALOMEDSClient
   TOOLSDS
+  KernelHelpers
   SALOMEDSImpl
   SALOMEDS
-  KernelHelpers
   ModuleGenerator
   Communication
   Communication_SWIG
   DSC
 )
 
+SET(SUBDIR_MPI MPIContainer TestMPIContainer)
+SET(SUBDIR_PARALLEL ParallelContainer)
+
+# CppUnit directories:
 SET(SUBDIR_CPPUNIT_BASE
   Basics/Test
   SALOMELocalTrace/Test
 )
-
 SET(SUBDIR_CPPUNIT_CORBA
   Logger/Test
   SALOMETraceCollector/Test
@@ -68,52 +71,32 @@ SET(SUBDIR_CPPUNIT_CORBA
   SALOMEDS/Test
   KernelHelpers/Test
 )
-
 SET(SUBDIR_CPPUNIT_GENERAL UnitTests)
-SET(SUBDIR_MPI MPIContainer TestMPIContainer)
-SET(SUBDIR_PARALLEL ParallelContainer)
 
-IF(WITHONLYLAUNCHER)
+IF(SALOME_LAUNCHER_ONLY)
   SET(SUBDIRS Basics ResourcesManager Launcher)
-ELSE(WITHONLYLAUNCHER)
+ELSE()
   SET(SUBDIRS ${SUBDIR_BASE})
-ENDIF(WITHONLYLAUNCHER)
-
-IF(CORBA_GEN)
-  SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA})
-ENDIF(CORBA_GEN)
+  IF(NOT SALOME_LIGHT_ONLY)
+    LIST(APPEND SUBDIRS ${SUBDIR_CORBA})
+  ENDIF()
 
-IF(MPI_IS_OK)
-  SET(SUBDIRS
-    ${SUBDIRS}
-    ${SUBDIR_MPI}
-  )
-ENDIF(MPI_IS_OK)
+  IF(SALOME_USE_MPI)
+    LIST(APPEND SUBDIRS ${SUBDIR_MPI})
+  ENDIF(SALOME_USE_MPI)
 
-IF(CPPUNIT_IS_OK)
-  IF(CORBA_GEN)
-    SET(SUBDIRS
-      ${SUBDIRS}
-      ${SUBDIR_CPPUNIT_BASE}
-      ${SUBDIR_CPPUNIT_CORBA}
-      ${SUBDIR_CPPUNIT_GENERAL}
-    )
-  ELSE(CORBA_GEN)
-    SET(SUBDIRS
-      ${SUBDIRS}
-      ${SUBDIR_CPPUNIT_BASE}
-      ${SUBDIR_CPPUNIT_GENERAL}
-    )
-  ENDIF(CORBA_GEN)
-ENDIF(CPPUNIT_IS_OK)
+  IF(SALOME_BUILD_TESTS)
+    LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_BASE} ${SUBDIR_CPPUNIT_GENERAL})
+    IF(NOT SALOME_LIGHT_ONLY)
+      LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_CORBA})
+    ENDIF()
+  ENDIF()
 
-IF(WITH_PACO_PARALLEL)
-  SET(SUBDIRS
-    ${SUBDIRS}
-    ${SUBDIR_PARALLEL}
-  )
-ENDIF(WITH_PACO_PARALLEL)
+  IF(SALOME_PACO_PARALLEL)
+    LIST(APPEND SUBDIRS  ${SUBDIR_PARALLEL})
+  ENDIF()
+ENDIF()
 
-FOREACH(DIR ${SUBDIRS})
-  ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
+FOREACH(_dir ${SUBDIRS})
+  ADD_SUBDIRECTORY(${_dir})
+ENDFOREACH()