summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-29 10:20:41 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-29 10:20:41 (GMT)
commit5ff1a2521b878992c0f72cdb5ae2f5daf7d6db76 (patch)
treeb9f7b07e172b14ba70da9a4ca671236a59dac443 /Tests
parente14974a208edd48c43ae9a80d76ea4e511e1b540 (diff)
parentfa7b041eca021cecfd883cc5796150dae5ad4c5f (diff)
downloadCMake-5ff1a2521b878992c0f72cdb5ae2f5daf7d6db76.zip
CMake-5ff1a2521b878992c0f72cdb5ae2f5daf7d6db76.tar.gz
CMake-5ff1a2521b878992c0f72cdb5ae2f5daf7d6db76.tar.bz2
Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' into release-3.16
Merge-request: !4815
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake
index 03a97ed..f8fba44 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake
@@ -5,6 +5,11 @@ if(CMAKE_C_COMPILE_OPTIONS_USE_PCH)
add_definitions(-DHAVE_PCH_SUPPORT)
endif()
+# Add this before the target from which we will reuse the PCH
+# to test that generators can handle reversed ordering.
+add_library(foo foo.c)
+target_include_directories(foo PUBLIC include)
+
add_library(empty empty.c)
target_precompile_headers(empty PRIVATE
<stdio.h>
@@ -12,8 +17,6 @@ target_precompile_headers(empty PRIVATE
)
target_include_directories(empty PUBLIC include)
-add_library(foo foo.c)
-target_include_directories(foo PUBLIC include)
target_precompile_headers(foo REUSE_FROM empty)
# should not cause problems if configured multiple times