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:
Brad King 2012-08-22 08:50:50 -04:00
parent 4c9ae472ec
commit f0ae381c73
1 changed files with 1 additions and 0 deletions

View File

@ -1219,6 +1219,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
// Get preprocessor definitions for this directory. // Get preprocessor definitions for this directory.
std::string defineFlags = this->Target->GetMakefile()->GetDefineFlags(); std::string defineFlags = this->Target->GetMakefile()->GetDefineFlags();
clOptions.FixExceptionHandlingDefault(); clOptions.FixExceptionHandlingDefault();
clOptions.AddFlag("PrecompiledHeader", "NotUsing");
clOptions.Parse(flags.c_str()); clOptions.Parse(flags.c_str());
clOptions.Parse(defineFlags.c_str()); clOptions.Parse(defineFlags.c_str());
clOptions.AddDefines clOptions.AddDefines