diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-10-05 10:20:37 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2019-10-09 11:50:25 (GMT) |
commit | 36ded610af1bf80304a35491eeb66c34c8e9b7a8 (patch) | |
tree | d41161cbbaafe3ecbe04aefffdc40e9e5adc6fae /Source/cmLocalVisualStudio7Generator.cxx | |
parent | f1fb63b306ad06a8931ca5a00a2b9ce9e66bc12e (diff) | |
download | CMake-36ded610af1bf80304a35491eeb66c34c8e9b7a8.zip CMake-36ded610af1bf80304a35491eeb66c34c8e9b7a8.tar.gz CMake-36ded610af1bf80304a35491eeb66c34c8e9b7a8.tar.bz2 |
PCH: Generate sources during Compute step
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 e16e851..03fb565 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1313,8 +1313,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); @@ -1452,6 +1450,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"))) { |