summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-16 15:03:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-16 15:04:03 (GMT)
commitfe7626da54341634689224625b6273c3cb0d0cc9 (patch)
treeb1d310e0ad1f3962caefc65871a81fecca313202
parentb289544810e4417cff3e46228e3471457b0be0e4 (diff)
parentc5c218fa0d00c0aa06bf51fafadd8e71f2c549fb (diff)
downloadCMake-fe7626da54341634689224625b6273c3cb0d0cc9.zip
CMake-fe7626da54341634689224625b6273c3cb0d0cc9.tar.gz
CMake-fe7626da54341634689224625b6273c3cb0d0cc9.tar.bz2
Merge topic 'pch-force-include'
c5c218fa0d PCH: Append pch header file to list of forced include files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4135
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx3
-rw-r--r--Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake2
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 8fc40a79..66cf683 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2418,6 +2418,9 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
clOptions.AppendFlag("DisableSpecificWarnings",
"%(DisableSpecificWarnings)");
}
+ if (clOptions.HasFlag("ForcedIncludeFiles")) {
+ clOptions.AppendFlag("ForcedIncludeFiles", "%(ForcedIncludeFiles)");
+ }
if (configDependentDefines) {
clOptions.AddDefines(
genexInterpreter.Evaluate(configDefines, "COMPILE_DEFINITIONS"));
diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake
index 27842f9..91cea0e 100644
--- a/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake
@@ -31,7 +31,7 @@ foreach(line IN LISTS tgt_projects_strings)
set(have_pch_header ON)
endif()
- if (line MATCHES "<ForcedIncludeFiles.*>.*${pch_header}</ForcedIncludeFiles>")
+ if (line MATCHES "<ForcedIncludeFiles.*>.*${pch_header}.*</ForcedIncludeFiles>")
set(have_force_pch_header ON)
endif()