ENH: Install stage2 to handle runtime problem
This commit is contained in:
parent
9107592550
commit
4dd97ff97f
|
@ -262,8 +262,7 @@ IF(BUILD_TESTING)
|
||||||
--build-options
|
--build-options
|
||||||
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
|
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
|
||||||
"-DSTAGE2:BOOL=1"
|
"-DSTAGE2:BOOL=1"
|
||||||
--test-command
|
--test-command ${SimpleInstallInstallDir}/bin/SimpleInstallS2)
|
||||||
${CMake_BINARY_DIR}/Tests/SimpleInstallS2/ExecPath/SimpleInstallS2)
|
|
||||||
|
|
||||||
ADD_TEST(X11 ${CMAKE_CTEST_COMMAND}
|
ADD_TEST(X11 ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
|
|
|
@ -18,6 +18,17 @@ IF(STAGE2)
|
||||||
ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
|
ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
|
||||||
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY})
|
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY})
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
TARGET SimpleInstallS2
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
ARGS ${EXTRA_INSTALL_FLAGS}
|
||||||
|
"-P${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
COMMENT "Install Project"
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALL_TARGETS(/bin SimpleInstallS2)
|
||||||
|
|
||||||
ELSE(STAGE2)
|
ELSE(STAGE2)
|
||||||
# this is stage 1, so create libraries and modules and install everything
|
# this is stage 1, so create libraries and modules and install everything
|
||||||
ADD_LIBRARY(test1 STATIC lib1.cxx)
|
ADD_LIBRARY(test1 STATIC lib1.cxx)
|
||||||
|
|
|
@ -18,6 +18,17 @@ IF(STAGE2)
|
||||||
ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
|
ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
|
||||||
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY})
|
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY})
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
TARGET SimpleInstallS2
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
ARGS ${EXTRA_INSTALL_FLAGS}
|
||||||
|
"-P${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake"
|
||||||
|
COMMENT "Install Project"
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALL_TARGETS(/bin SimpleInstallS2)
|
||||||
|
|
||||||
ELSE(STAGE2)
|
ELSE(STAGE2)
|
||||||
# this is stage 1, so create libraries and modules and install everything
|
# this is stage 1, so create libraries and modules and install everything
|
||||||
ADD_LIBRARY(test1 STATIC lib1.cxx)
|
ADD_LIBRARY(test1 STATIC lib1.cxx)
|
||||||
|
|
Loading…
Reference in New Issue