diff options
author | Brad King <brad.king@kitware.com> | 2020-06-29 09:18:06 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-29 09:20:42 -0400 |
commit | e5f5eeca2f632608cf4709cffef9d82f6f5be6f3 (patch) | |
tree | 17a6f581732c79732c82a1b682fb2e34443e692f /Tests/RunCMake/File_Configure | |
parent | e66fe75792a2fbe9f3ffe237c748008906ae7116 (diff) | |
download | cmake-e5f5eeca2f632608cf4709cffef9d82f6f5be6f3.tar.gz |
file: Fix CONFIGURE output relative path
In commit a6fee09484 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory. Treat them with
respect to the current binary directory instead.
Fixes: #20885
Diffstat (limited to 'Tests/RunCMake/File_Configure')
4 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake index d09d648b24..0337014eba 100644 --- a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake @@ -7,3 +7,4 @@ run_cmake(DirOutput) run_cmake(NewLineStyle-NoArg) run_cmake(NewLineStyle-ValidArg) run_cmake(NewLineStyle-WrongArg) +run_cmake(SubDir) diff --git a/Tests/RunCMake/File_Configure/SubDir-check.cmake b/Tests/RunCMake/File_Configure/SubDir-check.cmake new file mode 100644 index 0000000000..1e825878cd --- /dev/null +++ b/Tests/RunCMake/File_Configure/SubDir-check.cmake @@ -0,0 +1,4 @@ +set(expected "${RunCMake_TEST_BINARY_DIR}/SubDir/out.txt") +if(NOT EXISTS "${expected}") + set(RunCMake_TEST_FAILED "Expected file not created:\n ${expected}") +endif() diff --git a/Tests/RunCMake/File_Configure/SubDir.cmake b/Tests/RunCMake/File_Configure/SubDir.cmake new file mode 100644 index 0000000000..fae60fa721 --- /dev/null +++ b/Tests/RunCMake/File_Configure/SubDir.cmake @@ -0,0 +1 @@ +add_subdirectory(SubDir) diff --git a/Tests/RunCMake/File_Configure/SubDir/CMakeLists.txt b/Tests/RunCMake/File_Configure/SubDir/CMakeLists.txt new file mode 100644 index 0000000000..6bd962eee4 --- /dev/null +++ b/Tests/RunCMake/File_Configure/SubDir/CMakeLists.txt @@ -0,0 +1 @@ +file(CONFIGURE OUTPUT out.txt CONTENT "") |