Commit 98e51196 authored by Brad King's avatar Brad King 💬
Browse files

BUG: Install rule should take build configuration into account.

parent c69c9e01
......@@ -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}
......
......@@ -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}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment