diff options
author | Brad King <brad.king@kitware.com> | 2019-12-16 15:03:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-12-16 15:04:03 (GMT) |
commit | fe7626da54341634689224625b6273c3cb0d0cc9 (patch) | |
tree | b1d310e0ad1f3962caefc65871a81fecca313202 | |
parent | b289544810e4417cff3e46228e3471457b0be0e4 (diff) | |
parent | c5c218fa0d00c0aa06bf51fafadd8e71f2c549fb (diff) | |
download | CMake-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.cxx | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake | 2 |
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() |