summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/install/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake16
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)