diff options
author | Brad King <brad.king@kitware.com> | 2017-04-28 18:17:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-01 14:33:05 (GMT) |
commit | b115bc49ff26da9db3e9238a98030fd94847d0d0 (patch) | |
tree | 2de3c200b335c48a9bb8d96e7fa994e7d93943d4 /Source/cmGlobalGenerator.cxx | |
parent | e80e8eb609cc7dd8c4dca46b9c2819afd2293229 (diff) | |
download | CMake-b115bc49ff26da9db3e9238a98030fd94847d0d0.zip CMake-b115bc49ff26da9db3e9238a98030fd94847d0d0.tar.gz CMake-b115bc49ff26da9db3e9238a98030fd94847d0d0.tar.bz2 |
Features: Refactor <LANG>_STANDARD update
In order to support generator expressions in target COMPILE_FEATURES
we apply them at generate time. Move this step to the beginning of
generation instead of doing it on demand while collecting flags.
This avoids repeating the process unnecessarily, and will then allow
`cmLocalGenerator::AddCompilerRequirementFlag` to be used any time
during generation.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 50ad1a8..f3eb249 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1272,6 +1272,18 @@ bool cmGlobalGenerator::Compute() this->LocalGenerators[i]->AddHelperCommands(); } + // Finalize the set of compile features for each target. + // FIXME: This turns into calls to cmMakefile::AddRequiredTargetFeature + // which actually modifies the <lang>_STANDARD target property + // on the original cmTarget instance. It accumulates features + // across all configurations. Some refactoring is needed to + // compute a per-config resulta purely during generation. + for (i = 0; i < this->LocalGenerators.size(); ++i) { + if (!this->LocalGenerators[i]->ComputeTargetCompileFeatures()) { + return false; + } + } + #ifdef CMAKE_BUILD_WITH_CMAKE for (std::vector<cmGeneratorTarget const*>::iterator it = autogenTargets.begin(); |