Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Wed, 13 Nov 2013 12:03:34 +0000 (12:03 +0000)
committermpa <mpa@opencascade.com>
Wed, 13 Nov 2013 12:03:34 +0000 (12:03 +0000)
- enable cmake testing for have message "No tests were
found" if module has not tests

CMakeLists.txt
SalomeATOMSOLVConfig.cmake.in

index c0baa7bf48e9a54c3e8ea3976d83e5f065da558d..a4c80da1de15d782c45cf6c148e4e2a27bfb9c2c 100755 (executable)
@@ -57,11 +57,14 @@ SET(BUILD_SHARED_LIBS TRUE)
 # Local macros:
 LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 
-# User options
-# (some options have already been defined in KERNEL) 
+# User options 
 # ============
 #OPTION(SALOME_BUILD_DOC "Generate SALOME ATOMSOLV documentation" ON) #for use in the future
-#OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) #for use in the future
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
+
+IF(SALOME_BUILD_TESTS)
+  ENABLE_TESTING()
+ENDIF()
 
 ##
 ## From KERNEL:
index 3fb9a0988be2ed4ab1b4edfcde6d51558bd3a02b..9e7cb6284efc14621ce457a90a07c370947eb5e3 100644 (file)
@@ -52,8 +52,8 @@ SET(ATOMSOLV_DEFINITIONS "@ATOMGEN_DEFINITIONS@")
 #### Now the specificities
 
 # Options exported by the package:
-#SET(SALOME_ATOMSOLV_BUILD_DOC   @SALOME_BUILD_DOC@)
-#SET(SALOME_ATOMSOLV_BUILD_TESTS @SALOME_BUILD_TESTS@)
+#SET(SALOME_ATOMSOLV_BUILD_DOC  @SALOME_BUILD_DOC@)
+SET(SALOME_ATOMSOLV_BUILD_TESTS @SALOME_BUILD_TESTS@)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(ATOMGEN_ROOT_DIR_EXP "@PACKAGE_ATOMGEN_ROOT_DIR@")