diff options
author | Brad King <brad.king@kitware.com> | 2017-04-18 12:51:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-18 12:51:54 (GMT) |
commit | a3636dde5777fac3dd8975257cbb8d07cbad6b15 (patch) | |
tree | eb5a49d71e2b27153eb2c3f28831e47c9212ec19 /Tests/RunCMake | |
parent | c6a41a13bc025a30252ff569532fd2ca5768b8e9 (diff) | |
parent | 5e616fcf9ac1675fa4f3e7c1dc7f0e3dfb014df3 (diff) | |
download | CMake-a3636dde5777fac3dd8975257cbb8d07cbad6b15.zip CMake-a3636dde5777fac3dd8975257cbb8d07cbad6b15.tar.gz CMake-a3636dde5777fac3dd8975257cbb8d07cbad6b15.tar.bz2 |
Merge topic 'fix-CMP0026-old'
5e616fcf CMP0026: Fix OLD behavior with file written during configure step
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !710
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CMP0026/CMP0026-OLD.cmake | 12 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/RunCMakeTest.cmake | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0026/CMP0026-OLD.cmake b/Tests/RunCMake/CMP0026/CMP0026-OLD.cmake new file mode 100644 index 0000000..80497a3 --- /dev/null +++ b/Tests/RunCMake/CMP0026/CMP0026-OLD.cmake @@ -0,0 +1,12 @@ +enable_language(CXX) + +cmake_policy(SET CMP0026 OLD) + +set(out ${CMAKE_CURRENT_BINARY_DIR}/out.txt) + +add_library(somelib empty.cpp ${out}) +get_target_property(_loc somelib LOCATION) + +file(WRITE "${out}" + "source file written by project code after getting target LOCATION\n" + ) diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index 6331717..047da28 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -1,6 +1,7 @@ include(RunCMake) run_cmake(CMP0026-WARN) +run_cmake(CMP0026-OLD) run_cmake(CMP0026-NEW) run_cmake(CMP0026-IMPORTED) run_cmake(CMP0026-CONFIG-LOCATION-NEW) |