summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-08 12:48:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-08 12:48:56 (GMT)
commitd5e44d7a38b9b592f69a53f5322f2ad159086907 (patch)
tree188bf4e50adcd3a29ad7e44d2eb58cb497b38c60 /Tests
parent12cdb3692dbf33eb61bd42f7b1b01fa5d6a7b474 (diff)
parentff2e597ba23227e61c7d33a1168a5b5b9c858606 (diff)
downloadCMake-d5e44d7a38b9b592f69a53f5322f2ad159086907.zip
CMake-d5e44d7a38b9b592f69a53f5322f2ad159086907.tar.gz
CMake-d5e44d7a38b9b592f69a53f5322f2ad159086907.tar.bz2
Merge topic 'update-kwsys'
ff2e597ba2 Merge branch 'upstream-KWSys' into update-kwsys c5635588ad KWSys 2020-04-07 (caff9c3b) 2cc7baa1bc Tests: Fix get_filename_component PROGRAM test to use an executable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4578
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/get_filename_component/KnownComponents.cmake8
-rwxr-xr-xTests/RunCMake/get_filename_component/KnownComponents.sh1
2 files changed, 5 insertions, 4 deletions
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
index 54b858f..c2762ad 100644
--- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
@@ -85,12 +85,12 @@ check("PROGRAM with args output: args" "${test_program_args}" " arg1 arg2")
get_filename_component(test_program_name " " PROGRAM)
check("PROGRAM with just a space" "${test_program_name}" "")
-get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_FILE}" PROGRAM)
-check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
+get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh" PROGRAM)
+check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
-get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_FILE}\" arg1 arg2" PROGRAM
+get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh\" arg1 arg2" PROGRAM
PROGRAM_ARGS test_program_args)
-check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
+check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
check("PROGRAM specified explicitly with arguments: args" "${test_program_args}" " arg1 arg2")
list(APPEND non_cache_vars test_program_name)
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.sh b/Tests/RunCMake/get_filename_component/KnownComponents.sh
new file mode 100755
index 0000000..1a24852
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.sh
@@ -0,0 +1 @@
+#!/bin/sh