diff options
author | Brad King <brad.king@kitware.com> | 2021-02-03 00:27:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-03 17:26:58 (GMT) |
commit | e017ba046ccab62fcc67e7cf8fc858e991c1d3e7 (patch) | |
tree | 134567db3c1b3b4fab193a75a06413bdf003fe8f /Tests/RunCMake/install | |
parent | 56fc4a325f08465b725b08b3975cd51bdd2305c8 (diff) | |
download | CMake-e017ba046ccab62fcc67e7cf8fc858e991c1d3e7.zip CMake-e017ba046ccab62fcc67e7cf8fc858e991c1d3e7.tar.gz CMake-e017ba046ccab62fcc67e7cf8fc858e991c1d3e7.tar.bz2 |
AIX: Enable XCOFF editing to replace RPATH on installation
Avoid relinking before installation.
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-check-common.cmake | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index b067b3a..efd03df 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -48,14 +48,16 @@ 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") +# Wrapper for run_cmake() that skips platforms on which we do not support editing the RPATH. +function(run_cmake_EDIT_RPATH_only case) + if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG AND CMAKE_EXECUTABLE_FORMAT MATCHES "^(ELF|XCOFF)$") 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.") + elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX") + message(FATAL_ERROR "Expected platform AIX to advertize itself as XCOFF-based, but it did not.") else() message(STATUS "${case} - SKIPPED (No ELF-based platform found)") endif() @@ -63,7 +65,7 @@ function(run_cmake_ELFRPATH_only case) endfunction() run_cmake(TARGETS-FILE_RPATH_CHANGE-old_rpath) -run_cmake_ELFRPATH_only(TARGETS-FILE_RPATH_CHANGE-new_rpath) +run_cmake_EDIT_RPATH_only(TARGETS-FILE_RPATH_CHANGE-new_rpath) run_cmake(DIRECTORY-MESSAGE_NEVER) run_cmake(DIRECTORY-PATTERN-MESSAGE_NEVER) run_cmake(DIRECTORY-message) diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-check-common.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-check-common.cmake index 673fdde..6b2faa3 100644 --- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-check-common.cmake +++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-check-common.cmake @@ -22,6 +22,8 @@ macro(skip_without_rpath_change_rule) # Sanity check against a platform known to generate a file(RPATH_CHANGE) rule if(CMAKE_SYSTEM_NAME STREQUAL "Linux") message(FATAL_ERROR "Expected generated file(RPATH_CHANGE) rule on platform Linux.") + elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX") + message(FATAL_ERROR "Expected generated file(RPATH_CHANGE) rule on platform AIX.") else() message(STATUS "${test} - All checks skipped. No file(RPATH_CHANGE) rule found on this platform.") return() |