diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-09 01:08:58 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-09 01:08:58 (GMT) |
commit | 4dd97ff97f69b65d3eb59665ad37659268f6f1f7 (patch) | |
tree | f99fda41b17066e4cbf437bf42f91017e3dba4d8 | |
parent | 9107592550dcdcd549814b72a4d5f3c1c2616097 (diff) | |
download | CMake-4dd97ff97f69b65d3eb59665ad37659268f6f1f7.zip CMake-4dd97ff97f69b65d3eb59665ad37659268f6f1f7.tar.gz CMake-4dd97ff97f69b65d3eb59665ad37659268f6f1f7.tar.bz2 |
ENH: Install stage2 to handle runtime problem
-rw-r--r-- | Source/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 11 |
3 files changed, 23 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index c1bb7c6..31817cb 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -262,8 +262,7 @@ IF(BUILD_TESTING) --build-options "-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}" "-DSTAGE2:BOOL=1" - --test-command - ${CMake_BINARY_DIR}/Tests/SimpleInstallS2/ExecPath/SimpleInstallS2) + --test-command ${SimpleInstallInstallDir}/bin/SimpleInstallS2) ADD_TEST(X11 ${CMAKE_CTEST_COMMAND} --build-and-test diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index c70a0f8..3d30158 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -18,6 +18,17 @@ IF(STAGE2) ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h) 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) # this is stage 1, so create libraries and modules and install everything ADD_LIBRARY(test1 STATIC lib1.cxx) diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index c70a0f8..3d30158 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -18,6 +18,17 @@ IF(STAGE2) ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h) 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) # this is stage 1, so create libraries and modules and install everything ADD_LIBRARY(test1 STATIC lib1.cxx) |