diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 16 |
2 files changed, 32 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 diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index 461280d..c2de5b1 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/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 |