diff options
author | Brad King <brad.king@kitware.com> | 2019-10-10 13:22:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-10-10 13:22:39 (GMT) |
commit | bab7ec3c259f31eb696f84c55ac80497e30f13df (patch) | |
tree | 3d8689371f71200fe5c2274fb7bddf995337703f /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 0d1bf3f660faebd8b73d638d0359db5502e2f3d6 (diff) | |
parent | 36ded610af1bf80304a35491eeb66c34c8e9b7a8 (diff) | |
download | CMake-bab7ec3c259f31eb696f84c55ac80497e30f13df.zip CMake-bab7ec3c259f31eb696f84c55ac80497e30f13df.tar.gz CMake-bab7ec3c259f31eb696f84c55ac80497e30f13df.tar.bz2 |
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.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"))) { |