summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt28
1 files changed, 19 insertions, 9 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index e5c8a63..685357b 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -53,16 +53,26 @@ LINK_LIBRARIES(CMakeLib)
LINK_DIRECTORIES(${CMake_BINARY_DIR}/Sources)
ADD_EXECUTABLE(cmake cmakemain)
-ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
-CONFIGURE_FILE(
-${CMake_SOURCE_DIR}/Source/cmaketest.h.in
-${CMake_BINARY_DIR}/Source/cmaketest.h ESCAPE_QUOTES)
-ADD_TEST(simple ${CMake_BINARY_DIR}/Source/cmaketest
- ${CMake_SOURCE_DIR}/Tests/Simple
- ${CMake_BINARY_DIR}/Tests/Simple
- ${CMake_BINARY_DIR}/Tests/Simple/simple
-)
+IF(BUILD_TESTING)
+ IF (DART_ROOT)
+ ADD_EXECUTABLE(cmaketest cmaketest.cxx cmSystemTools.cxx)
+ ADD_DEPENDENCIES(cmaketest cmake)
+ ADD_DEPENDENCIES(Nightly cmaketest cmake)
+ ADD_DEPENDENCIES(Experimental cmaketest cmake)
+
+ CONFIGURE_FILE(
+ ${CMake_SOURCE_DIR}/Source/cmaketest.h.in
+ ${CMake_BINARY_DIR}/Source/cmaketest.h ESCAPE_QUOTES)
+ ADD_TEST(simple ${CMake_BINARY_DIR}/Source/cmaketest
+ ${CMake_SOURCE_DIR}/Tests/Simple
+ ${CMake_BINARY_DIR}/Tests/Simple
+ ${CMake_BINARY_DIR}/Tests/Simple/simple
+ )
+
+ ENDIF (DART_ROOT)
+ENDIF(BUILD_TESTING)
+
INSTALL_TARGETS(/bin cmake)