]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Wed, 6 Nov 2013 10:36:07 +0000 (10:36 +0000)
committermpa <mpa@opencascade.com>
Wed, 6 Nov 2013 10:36:07 +0000 (10:36 +0000)
- define variable SALOME_BUILD_TESTS and find CppUnit for adding tests to this module

CMakeLists.txt
SalomeSMESHConfig.cmake.in

index 07278cd49678bf46f011a509e4923edb80b5e514..9d8acde2f37ab3d69ec3137ac259df8329b93cda 100755 (executable)
@@ -60,7 +60,7 @@ LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 # User options
 # (some options have already been defined in KERNEL) 
 # ============
-# OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) For use in the future
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ON)
   
 # Advanced options:
@@ -108,7 +108,11 @@ FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
 IF(SALOME_USE_MPI)
   FIND_PACKAGE(SalomeMPI) # needed for doc generation by Sphinx
 ENDIF()
-
+IF(SALOME_BUILD_TESTS)
+  ENABLE_TESTING()
+  FIND_PACKAGE(SalomeCppUnit)
+  SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)
+ENDIF()
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen)
   FIND_PACKAGE(SalomeSphinx)
index 8a36a1cc3c31b2c776f5a9ae4556843306783208..d82a2ee2a0f26cfc91705bfa35f223c88d6e66d1 100644 (file)
@@ -53,6 +53,7 @@ SET(SMESH_DEFINITIONS "@GEOM_DEFINITIONS@")
 
 # Options exported by the package:
 SET(SALOME_SMESH_BUILD_DOC @SALOME_BUILD_DOC@)
+SET(SALOME_SMESH_BUILD_TESTS @SALOME_BUILD_TESTS@)
 
 # Advanced options
 SET(SALOME_SMESH_BUILD_GUI @SALOME_BUILD_GUI@)