summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-03-27 13:03:44 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-04-06 16:12:14 (GMT)
commitf867423aa214e3145fe4e6775eb9634c340df02b (patch)
tree86ec75c2752ddcf02c12d36b6aef23271b6d3ab5 /Tests/RunCMake/install
parent888b8a43d82e6f6157642c2bd84520920d8e2d11 (diff)
downloadCMake-f867423aa214e3145fe4e6775eb9634c340df02b.zip
CMake-f867423aa214e3145fe4e6775eb9634c340df02b.tar.gz
CMake-f867423aa214e3145fe4e6775eb9634c340df02b.tar.bz2
file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicable
On machines where the gnu bin utils are prefixed, or suffixed the file(GET_RUNTIME_DEPENDENCIES ) command would fail without explicitly setting the location of objdump. Now we pre-populate the variables used to find objdump based on the gnu bin utils, so that these use cases are better supported
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt1
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt6
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt1
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt6
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake17
6 files changed, 32 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 70570b7..bd0bbe3 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -188,6 +188,7 @@ else()
endif()
set(run_install_test_components 1)
+run_install_test(file-GET_RUNTIME_DEPENDENCIES-variable-propagation)
run_install_test(FILES-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-NAMELINK_COMPONENT)
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt
new file mode 100644
index 0000000..591a5e7
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(message\):
+.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: custom-platform.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: custom-platform-objdump.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: path/to/custom-objdump.*
+.*CMAKE_OBJDUMP: custom-objdump.*
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt
new file mode 100644
index 0000000..591a5e7
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(message\):
+.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: custom-platform.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: custom-platform-objdump.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: path/to/custom-objdump.*
+.*CMAKE_OBJDUMP: custom-objdump.*
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake
new file mode 100644
index 0000000..07bbc5e
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM "custom-platform")
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL "custom-platform-objdump")
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND "path/to/custom-objdump")
+set(CMAKE_OBJDUMP "custom-objdump")
+
+install(CODE [[
+message(FATAL_ERROR "
+ CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: ${CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM}
+ CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: ${CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL}
+ CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: ${CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND}
+ CMAKE_OBJDUMP: ${CMAKE_OBJDUMP}
+")
+]]
+COMPONENT dev
+)