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

CMakeLists.txt
SalomeCOMPONENTConfig.cmake.in

index 1e9392acdfd8b2f7c2b5029d9601f22980a52834..f3a3296e9d7ad463c17bcc67b6e52aa92e9a4b50 100755 (executable)
@@ -59,11 +59,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 COMPONENT 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 1d559a92adfd90c49f3f7e7a1493c1c80f37df9c..f5870afc7be3063f9e3ef39ce8563b05efa56e0b 100644 (file)
@@ -52,8 +52,8 @@ SET(COMPONENT_DEFINITIONS "@KERNEL_DEFINITIONS@")
 #### Now the specificities
 
 # Options exported by the package:
-#SET(SALOME_COMPONENT_BUILD_DOC   @SALOME_BUILD_DOC@)
-#SET(SALOME_COMPONENT_BUILD_TESTS @SALOME_BUILD_TESTS@)
+#SET(SALOME_COMPONENT_BUILD_DOC  @SALOME_BUILD_DOC@)
+SET(SALOME_COMPONENT_BUILD_TESTS @SALOME_BUILD_TESTS@)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")