summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-13 10:49:35 -0500
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-13 10:49:35 -0500
commit7b36bf6cfd54352d43b12fde98eeba003c170a79 (patch)
tree178eb13edb2e292f6601a438e52f60bb234fb5de
parent325baa33d2d408391e52b36c3430ba8bfa3de2c4 (diff)
downloadcmake-7b36bf6cfd54352d43b12fde98eeba003c170a79.tar.gz
ENH: Do not build the library if we are not doing Testing
-rw-r--r--Source/kwsys/CMakeLists.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 6771d26d08..c8f624f12a 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -513,14 +513,6 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE}
${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
- # If kwsys contains the DynamicLoader, need extra library
- IF(KWSYS_USE_DynamicLoader)
- ADD_LIBRARY(testDynload MODULE testDynload.c)
- IF(UNIX)
- TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
- ENDIF(UNIX)
- ENDIF(KWSYS_USE_DynamicLoader)
-
# Apply user-defined target properties to the library.
IF(KWSYS_PROPERTIES_CXX)
SET_TARGET_PROPERTIES(${KWSYS_NAMESPACE} PROPERTIES
@@ -614,6 +606,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
SET(EXTRA_TESTS
testDynamicLoader
)
+ # If kwsys contains the DynamicLoader, need extra library
+ ADD_LIBRARY(testDynload MODULE testDynload.c)
+ IF(UNIX)
+ TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
+ ENDIF(UNIX)
ENDIF(KWSYS_USE_DynamicLoader)
FOREACH(test
testSystemTools
@@ -670,6 +667,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_TEST(kwsys.testRegistry ${EXEC_DIR}/testRegistry)
IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
ADD_TEST(kwsys.testFail ${EXEC_DIR}/testFail)
+ # We expect test to fail
SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES WILL_FAIL ON)
GET_TEST_PROPERTY(kwsys.testFail WILL_FAIL wfv)
SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES FAIL_REGULAR_EXPRESSION "ERROR;FAIL;Test failed")