diff options
author | Brad King <brad.king@kitware.com> | 2019-10-10 13:14:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-10 13:14:58 (GMT) |
commit | e5419f4f873d8c233c9903a813866bc0c759dfc9 (patch) | |
tree | d6eae7aed6ecaee7988d6a1b199f6d96c7b3516d /Source/cmLocalVisualStudio7Generator.cxx | |
parent | b63dc7c8fc7a9d3487577dedf7dfabc63bc20817 (diff) | |
parent | 36ded610af1bf80304a35491eeb66c34c8e9b7a8 (diff) | |
download | CMake-e5419f4f873d8c233c9903a813866bc0c759dfc9.zip CMake-e5419f4f873d8c233c9903a813866bc0c759dfc9.tar.gz CMake-e5419f4f873d8c233c9903a813866bc0c759dfc9.tar.bz2 |
Merge branch 'pch-generate' into release-3.16
Merge-request: !3890
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index ce2e513..ff1eaec 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"))) { |