From 98e51196642d384336b08461ca56eb7c651a9eb0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Aug 2005 17:56:26 -0400 Subject: BUG: Install rule should take build configuration into account. --- Tests/SimpleInstall/CMakeLists.txt | 14 +++++++++++++- Tests/SimpleInstallS2/CMakeLists.txt | 14 +++++++++++++- 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} -- cgit v0.12