summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-12-15 19:15:27 (GMT)
committerBrad King <brad.king@kitware.com>2009-12-15 19:15:27 (GMT)
commit357096d35a5ee417aa1f77fdfdace083fec3635e (patch)
tree958d2c9b4ba4d371885a63a6349823023aa2509a
parent1ac1058272b03fee1e4f5ca1de0fd46453a8b125 (diff)
downloadCMake-357096d35a5ee417aa1f77fdfdace083fec3635e.zip
CMake-357096d35a5ee417aa1f77fdfdace083fec3635e.tar.gz
CMake-357096d35a5ee417aa1f77fdfdace083fec3635e.tar.bz2
KWSys: Build tests after libraries
The TestSharedForward executable and TestDynload module do not actually link to a KWSys library, but it is nice to build them after the libraries just like all other test binaries. This also works around a universal binary bug in Xcode 2.x. It forgets to create the output directory for the executable before linking it. We avoid the problem by putting the library in the directory first.
-rw-r--r--Source/kwsys/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index e7a5e7d..62042e8 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -1020,6 +1020,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
# If kwsys contains the DynamicLoader, need extra library
ADD_LIBRARY(${KWSYS_NAMESPACE}TestDynload MODULE testDynload.c)
KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB})
+ ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestDynload ${KWSYS_NAMESPACE})
ENDIF(KWSYS_USE_DynamicLoader)
CREATE_TEST_SOURCELIST(
KWSYS_CXX_TEST_SRCS ${KWSYS_NAMESPACE}TestsCxx.cxx
@@ -1099,6 +1100,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestSharedForward
${PROJECT_BINARY_DIR}/testSharedForward.c)
KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestSharedForward ${KWSYS_NAMESPACE}_c)
ADD_TEST(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
KWSYS_SET_PROPERTY(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})