summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-01 11:44:28 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-01 11:44:35 (GMT)
commit3020decbffba27a7525211293d40d0411b504d9e (patch)
treee5362c0b04049f44f6a955cff49804dc99ac4759 /Tests/RunCMake
parentb763a5e3257aa6bdda989f67ed2157717a0a583e (diff)
parent902858367f27e52a3693f8e65573621d9382ac88 (diff)
downloadCMake-3020decbffba27a7525211293d40d0411b504d9e.zip
CMake-3020decbffba27a7525211293d40d0411b504d9e.tar.gz
CMake-3020decbffba27a7525211293d40d0411b504d9e.tar.bz2
Merge topic 'pch-fix-bad-ClearSourcesCache'
902858367f Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' fa7b041eca PCH: Fix logic error that incorrectly clears sources during VS generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4815
Diffstat (limited to 'Tests/RunCMake')
-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