summaryrefslogtreecommitdiff
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-10 13:22:24 +0000
committerKitware Robot <kwrobot@kitware.com>2019-10-10 09:22:39 -0400
commitbab7ec3c259f31eb696f84c55ac80497e30f13df (patch)
tree3d8689371f71200fe5c2274fb7bddf995337703f /Source/cmLocalVisualStudio7Generator.cxx
parent0d1bf3f660faebd8b73d638d0359db5502e2f3d6 (diff)
parent36ded610af1bf80304a35491eeb66c34c8e9b7a8 (diff)
downloadcmake-bab7ec3c259f31eb696f84c55ac80497e30f13df.tar.gz
Merge topic 'pch-generate'
36ded610af PCH: Generate sources during Compute step Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3890
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ce2e51330d..ff1eaec935 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1317,8 +1317,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
const std::string& libName,
cmGeneratorTarget* target)
{
- this->AddPchDependencies(target, "");
-
std::vector<std::string> configs;
this->Makefile->GetConfigurations(configs);
@@ -1456,6 +1454,22 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
fc.CompileFlags, genexInterpreter.Evaluate(coptions, COMPILE_OPTIONS));
needfc = true;
}
+ // Add precompile headers compile options.
+ const std::string pchSource = gt->GetPchSource(config, lang);
+ if (!pchSource.empty() && !sf.GetProperty("SKIP_PRECOMPILE_HEADERS")) {
+ std::string pchOptions;
+ if (sf.GetFullPath() == pchSource) {
+ pchOptions = gt->GetPchCreateCompileOptions(config, lang);
+ } else {
+ pchOptions = gt->GetPchUseCompileOptions(config, lang);
+ }
+
+ lg->AppendCompileOptions(
+ fc.CompileFlags,
+ genexInterpreter.Evaluate(pchOptions, COMPILE_OPTIONS));
+ needfc = true;
+ }
+
if (lg->FortranProject) {
switch (cmOutputConverter::GetFortranFormat(
sf.GetProperty("Fortran_FORMAT"))) {