summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-19 21:56:26 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-19 21:56:26 (GMT)
commit98e51196642d384336b08461ca56eb7c651a9eb0 (patch)
tree546dbb05935fdf0c35d5e31e70b3df0f2d447253 /Tests
parentc69c9e0134aa41df5c8def0c0d9d8878d0ae1cdc (diff)
downloadCMake-98e51196642d384336b08461ca56eb7c651a9eb0.zip
CMake-98e51196642d384336b08461ca56eb7c651a9eb0.tar.gz
CMake-98e51196642d384336b08461ca56eb7c651a9eb0.tar.bz2
BUG: Install rule should take build configuration into account.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt14
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt14
2 files changed, 26 insertions, 2 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index f413385..411aa97 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -23,6 +23,11 @@ IF(STAGE2)
SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/bin")
ENDIF(CYGWIN OR MINGW)
MESSAGE("Search for library in: ${LIBPATHS}")
+
+ SET(TEST1_LIBRARY "TEST1_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+ SET(TEST2_LIBRARY "TEST2_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+ SET(TEST4_LIBRARY "TEST4_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+
FIND_LIBRARY(TEST1_LIBRARY
NAMES ${t1NAMES}
PATHS ${LIBPATHS}
@@ -75,11 +80,18 @@ ELSE(STAGE2)
SET_TARGET_PROPERTIES(test4 PROPERTIES VERSION 1.2 SOVERSION 3)
ENDIF(STAGE2)
+IF(CMAKE_CONFIGURATION_TYPES)
+ SET(SI_CONFIG -C ${CMAKE_CFG_INTDIR})
+ELSE(CMAKE_CONFIGURATION_TYPES)
+ SET(SI_CONFIG)
+ENDIF(CMAKE_CONFIGURATION_TYPES)
+
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
- ARGS --build-and-test
+ ARGS ${SI_CONFIG}
+ --build-and-test
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
--build-generator ${CMAKE_GENERATOR}
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index f413385..411aa97 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -23,6 +23,11 @@ IF(STAGE2)
SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/bin")
ENDIF(CYGWIN OR MINGW)
MESSAGE("Search for library in: ${LIBPATHS}")
+
+ SET(TEST1_LIBRARY "TEST1_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+ SET(TEST2_LIBRARY "TEST2_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+ SET(TEST4_LIBRARY "TEST4_LIBRARY-NOTFOUND" CACHE FILEPATH "Force find." FORCE)
+
FIND_LIBRARY(TEST1_LIBRARY
NAMES ${t1NAMES}
PATHS ${LIBPATHS}
@@ -75,11 +80,18 @@ ELSE(STAGE2)
SET_TARGET_PROPERTIES(test4 PROPERTIES VERSION 1.2 SOVERSION 3)
ENDIF(STAGE2)
+IF(CMAKE_CONFIGURATION_TYPES)
+ SET(SI_CONFIG -C ${CMAKE_CFG_INTDIR})
+ELSE(CMAKE_CONFIGURATION_TYPES)
+ SET(SI_CONFIG)
+ENDIF(CMAKE_CONFIGURATION_TYPES)
+
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
- ARGS --build-and-test
+ ARGS ${SI_CONFIG}
+ --build-and-test
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
--build-generator ${CMAKE_GENERATOR}