mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-05 22:59:43 -06:00
VS: Disable precompiled headers unless enabled by project (#12930)
In VS 11 the WindowsAppContainer element enabled by the VS_WINRT_EXTENSIONS property activates precompiled header support automatically if no PrecompiledHeader setting is specified. For VS 10 and 11 set PrecompiledHeader to "NotUsing" explicitly by default unless overridden by a project-specified flag. Suggested-by: Eugene Golushkov <eugene_gff@ukr.net>
This commit is contained in:
@@ -1219,6 +1219,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
// Get preprocessor definitions for this directory.
|
||||
std::string defineFlags = this->Target->GetMakefile()->GetDefineFlags();
|
||||
clOptions.FixExceptionHandlingDefault();
|
||||
clOptions.AddFlag("PrecompiledHeader", "NotUsing");
|
||||
clOptions.Parse(flags.c_str());
|
||||
clOptions.Parse(defineFlags.c_str());
|
||||
clOptions.AddDefines
|
||||
|
||||
Reference in New Issue
Block a user