]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Added option to enable or disable tests.
authorbarate <barate>
Wed, 22 Jul 2009 14:47:44 +0000 (14:47 +0000)
committerbarate <barate>
Wed, 22 Jul 2009 14:47:44 +0000 (14:47 +0000)
CMakeLists.txt
src/Local/CMakeLists.txt
src/PBS/CMakeLists.txt
src/Python/CMakeLists.txt

index 7142ff2ce87f833cada3282d698b309db3d5e4e8..c7b8b08d6caed256359be8a7dce634feef75b356 100644 (file)
@@ -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)
index 0fbe4a27275db99f7ccd2cfe04ebd0a0929a1f91..c301edec4c0c331fd226224bf4a2ca25562adb7d 100644 (file)
@@ -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)
index 9a0a2da6ece5c35de9cae28e6feeb995ff750f99..6541543a24a1d2ffd7d4f14ff67c873c736dae77 100644 (file)
@@ -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)
index f6e682cf6a766b728deb154a2dac39d16434e913..e49fb8c2dbb9422c69837db6c23a9486c441be59 100644 (file)
@@ -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)