From 6a798f2e8df55a49aa449dbcd48450638d0382c2 Mon Sep 17 00:00:00 2001 From: barate Date: Wed, 22 Jul 2009 14:47:44 +0000 Subject: [PATCH] Added option to enable or disable tests. --- CMakeLists.txt | 7 +++++-- src/Local/CMakeLists.txt | 4 +++- src/PBS/CMakeLists.txt | 4 +++- src/Python/CMakeLists.txt | 4 +++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7142ff2..c7b8b08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,6 @@ project (libBatch) cmake_minimum_required (VERSION 2.4) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules/) -ENABLE_TESTING() - find_package (PThread REQUIRED) find_package (Makeinfo) @@ -34,6 +32,11 @@ SET (BUILD_LSF_INTERFACE TRUE CACHE BOOL "Build interface for LSF batch system") SET (BUILD_PBS_INTERFACE TRUE CACHE BOOL "Build interface for PBS batch system") SET (BUILD_LOCAL_SUBMISSION TRUE CACHE BOOL "Build classes for local submission") SET (BUILD_PYTHON_WRAPPING TRUE CACHE BOOL "Generate Python wrapping") +SET (TEST_ENABLED FALSE CACHE BOOL "Enable testing") + +IF (TEST_ENABLED) + ENABLE_TESTING() +ENDIF (TEST_ENABLED) IF (BUILD_LSF_INTERFACE) find_package (LSF) diff --git a/src/Local/CMakeLists.txt b/src/Local/CMakeLists.txt index 0fbe4a2..c301ede 100644 --- a/src/Local/CMakeLists.txt +++ b/src/Local/CMakeLists.txt @@ -36,4 +36,6 @@ SET(CLASS_LIST Local/Batch_BatchManager_Local_RSH APPEND_CLASSES_TO_SRC_FILES(${CLASS_LIST}) APPEND_CLASSES_TO_HDR_FILES(${CLASS_LIST}) -add_subdirectory(Test) +IF (TEST_ENABLED) + add_subdirectory(Test) +ENDIF (TEST_ENABLED) diff --git a/src/PBS/CMakeLists.txt b/src/PBS/CMakeLists.txt index 9a0a2da..6541543 100644 --- a/src/PBS/CMakeLists.txt +++ b/src/PBS/CMakeLists.txt @@ -37,4 +37,6 @@ ENDIF (BUILD_PBS_INTERFACE AND PBS_FOUND) APPEND_CLASSES_TO_SRC_FILES(${CLASS_LIST}) APPEND_CLASSES_TO_HDR_FILES(${CLASS_LIST}) -add_subdirectory(Test) +IF (TEST_ENABLED) + add_subdirectory(Test) +ENDIF (TEST_ENABLED) diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt index f6e682c..e49fb8c 100644 --- a/src/Python/CMakeLists.txt +++ b/src/Python/CMakeLists.txt @@ -38,4 +38,6 @@ INSTALL(FILES Batch_PyVersatile.hxx DESTINATION include/Batch) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES libBatch_Swig.py) -add_subdirectory(Test) +IF (TEST_ENABLED) + add_subdirectory(Test) +ENDIF (TEST_ENABLED) -- 2.39.2