diff options
author | Brad King <brad.king@kitware.com> | 2020-04-07 14:14:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-07 14:30:53 (GMT) |
commit | 2cc7baa1bc7f9e37b1a19d6700c64890142030d8 (patch) | |
tree | 5b120ee7612b0ea03b8d02d1749bca95053cf5b1 | |
parent | b8b804e2ed8dca3c6d116a6e8a1cb66cbd6ad241 (diff) | |
download | CMake-2cc7baa1bc7f9e37b1a19d6700c64890142030d8.zip CMake-2cc7baa1bc7f9e37b1a19d6700c64890142030d8.tar.gz CMake-2cc7baa1bc7f9e37b1a19d6700c64890142030d8.tar.bz2 |
Tests: Fix get_filename_component PROGRAM test to use an executable
-rw-r--r-- | Tests/RunCMake/get_filename_component/KnownComponents.cmake | 8 | ||||
-rwxr-xr-x | Tests/RunCMake/get_filename_component/KnownComponents.sh | 1 |
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 |