diff options
author | Brad King <brad.king@kitware.com> | 2006-05-05 18:57:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-05-05 18:57:19 (GMT) |
commit | 50a0f71120afe28c205bacab5a1350eb04815f3d (patch) | |
tree | 7f3473d0e452b39c63e59763cca41167f3483a26 /Tests/SimpleInstall | |
parent | 059320a5774fcaaced1a6155fec7dd5816bb1f75 (diff) | |
download | CMake-50a0f71120afe28c205bacab5a1350eb04815f3d.zip CMake-50a0f71120afe28c205bacab5a1350eb04815f3d.tar.gz CMake-50a0f71120afe28c205bacab5a1350eb04815f3d.tar.bz2 |
ENH: Added CONFIGURATIONS option to INSTALL command to allow per-configuration install rules.
Diffstat (limited to 'Tests/SimpleInstall')
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 461280d..c2de5b1 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -72,6 +72,14 @@ IF(STAGE2) MESSAGE(SEND_ERROR "test1 not found in lib/static!") ENDIF("${TEST1_LIBRARY}" MATCHES "static") + # Check for failure of configuration-specific installation. + IF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Release/lib1debug.h") + MESSAGE(FATAL_ERROR "Debug-configuration file installed for Release!") + ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Release/lib1debug.h") + IF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h") + MESSAGE(FATAL_ERROR "Release-configuration file installed for Debug!") + ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h") + # Make sure the test executable can run from the install tree. SET_TARGET_PROPERTIES(SimpleInstallS2 PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib) @@ -122,6 +130,14 @@ ELSE(STAGE2) ) INSTALL_FILES(/MyTest/include FILES lib3.h) + # Test configuration-specific installation. + INSTALL(FILES lib1.h RENAME lib1release.h CONFIGURATIONS Release + DESTINATION MyTest/include/Release + ) + INSTALL(FILES lib1.h RENAME lib1debug.h CONFIGURATIONS Debug + DESTINATION MyTest/include/Debug + ) + # Test user-specified install scripts. INSTALL( SCRIPT InstallScript1.cmake |