diff options
author | Dennis Klein <d.klein@gsi.de> | 2019-06-13 14:40:01 (GMT) |
---|---|---|
committer | Dennis Klein <d.klein@gsi.de> | 2019-06-13 14:41:11 (GMT) |
commit | 4caefbb42369cf652df920edd07ee9e81eb95577 (patch) | |
tree | 4ebb103777b4c69889c25c3c55f7ee3ad571a9c6 /Tests/RunCMake/install/RunCMakeTest.cmake | |
parent | 749ce48eb5b2876b347115a857839fdf9c24a221 (diff) | |
download | CMake-4caefbb42369cf652df920edd07ee9e81eb95577.zip CMake-4caefbb42369cf652df920edd07ee9e81eb95577.tar.gz CMake-4caefbb42369cf652df920edd07ee9e81eb95577.tar.bz2 |
cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule
Diffstat (limited to 'Tests/RunCMake/install/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 026148e..21c320b 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -48,6 +48,22 @@ in directory: endif() endfunction() +# Wrapper for run_cmake() that skips platforms that are non-ELF or have no RPATH support +function(run_cmake_ELFRPATH_only case) + if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG AND CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") + run_cmake(${case}) + else() + # Sanity check against a platform known to be ELF-based + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + message(FATAL_ERROR "Expected platform Linux to advertize itself as ELF-based, but it did not.") + else() + message(STATUS "${case} - SKIPPED (No ELF-based platform found)") + endif() + endif() +endfunction() + +run_cmake(TARGETS-FILE_RPATH_CHANGE-old_rpath) +run_cmake_ELFRPATH_only(TARGETS-FILE_RPATH_CHANGE-new_rpath) run_cmake(DIRECTORY-MESSAGE_NEVER) run_cmake(DIRECTORY-PATTERN-MESSAGE_NEVER) run_cmake(DIRECTORY-message) |