diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-12-13 00:12:15 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2019-12-13 14:21:27 (GMT) |
commit | c5c218fa0d00c0aa06bf51fafadd8e71f2c549fb (patch) | |
tree | 376705479df431752a9d1a6e8c3bac433bd82c07 | |
parent | a033bafbe01fcb4654f075955e0b3de7be81b0f7 (diff) | |
download | CMake-c5c218fa0d00c0aa06bf51fafadd8e71f2c549fb.zip CMake-c5c218fa0d00c0aa06bf51fafadd8e71f2c549fb.tar.gz CMake-c5c218fa0d00c0aa06bf51fafadd8e71f2c549fb.tar.bz2 |
PCH: Append pch header file to list of forced include files
Fixes: #20088
-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 94b6495..ed09471 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2399,6 +2399,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() |