diff options
author | Brad King <brad.king@kitware.com> | 2015-09-21 13:25:29 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-09-21 13:25:29 (GMT) |
commit | dd8285c6880e08e4c6cbb0e2ca1a1684df3e11d1 (patch) | |
tree | 0c72135867161a3722857767c7d1d85f834acacb /Tests | |
parent | 4f640afc1aa571a4a1a9083b62e3d2787db84bf3 (diff) | |
parent | 2514e4265c1914f53f9445f331ddb7183f0d9501 (diff) | |
download | CMake-dd8285c6880e08e4c6cbb0e2ca1a1684df3e11d1.zip CMake-dd8285c6880e08e4c6cbb0e2ca1a1684df3e11d1.tar.gz CMake-dd8285c6880e08e4c6cbb0e2ca1a1684df3e11d1.tar.bz2 |
Merge topic 'fix-compatibility-mode-LOCATION'
2514e426 CMP0026: Use compatibility codepath until configure is finished (#15748)
b98f7712 cmGlobalGenerator: Add API for the configure step being finished.
b5de2bd9 cmLocalGenerator: Simplify condition.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMP0026/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/clear-cached-information-dir/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0026/clear-cached-information.cmake | 14 |
3 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index fc58ea5..6331717 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -11,3 +11,4 @@ run_cmake(CMP0026-LOCATION-CONFIG-OLD) run_cmake(CMP0026-LOCATION-CONFIG-WARN) run_cmake(ObjlibNotDefined) run_cmake(LOCATION-and-TARGET_OBJECTS) +run_cmake(clear-cached-information) diff --git a/Tests/RunCMake/CMP0026/clear-cached-information-dir/CMakeLists.txt b/Tests/RunCMake/CMP0026/clear-cached-information-dir/CMakeLists.txt new file mode 100644 index 0000000..c51e883 --- /dev/null +++ b/Tests/RunCMake/CMP0026/clear-cached-information-dir/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_executable(Hello ${CMAKE_CURRENT_BINARY_DIR}/main.c) diff --git a/Tests/RunCMake/CMP0026/clear-cached-information.cmake b/Tests/RunCMake/CMP0026/clear-cached-information.cmake new file mode 100644 index 0000000..dd2dd72 --- /dev/null +++ b/Tests/RunCMake/CMP0026/clear-cached-information.cmake @@ -0,0 +1,14 @@ + +enable_language(C) + +cmake_policy(SET CMP0026 OLD) + +add_subdirectory(clear-cached-information-dir) + +# Critical: this needs to happen in root CMakeLists.txt and not inside +# the subdir. +get_target_property(mypath Hello LOCATION) +# Now we create the file later, so you can see, ultimately no error should +# happen e.g. during generate phase: +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c) +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c PROPERTIES GENERATED TRUE) |