From 8451afc0e44c0e298f81b99dbf2f4f3a44a5e81f Mon Sep 17 00:00:00 2001 From: mpa Date: Wed, 13 Nov 2013 12:04:55 +0000 Subject: [PATCH] CMake: - enable cmake testing for have message "No tests were found" if module has not tests --- CMakeLists.txt | 9 ++++++--- SalomeCOMPONENTConfig.cmake.in | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e9392a..f3a3296 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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: diff --git a/SalomeCOMPONENTConfig.cmake.in b/SalomeCOMPONENTConfig.cmake.in index 1d559a9..f5870af 100644 --- a/SalomeCOMPONENTConfig.cmake.in +++ b/SalomeCOMPONENTConfig.cmake.in @@ -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@") -- 2.39.2