diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-08-30 09:47:37 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-08-30 11:52:13 (GMT) |
commit | 10507c6dc0918777d43b3f961bd18162866f0bbb (patch) | |
tree | d0b05fd25d6c25e3ef47a81905bed33a65cccc49 /Source/cmFileAPICodemodel.cxx | |
parent | 3ec986ce8e8df269eb6b6b9f37e12b02194168fd (diff) | |
download | CMake-10507c6dc0918777d43b3f961bd18162866f0bbb.zip CMake-10507c6dc0918777d43b3f961bd18162866f0bbb.tar.gz CMake-10507c6dc0918777d43b3f961bd18162866f0bbb.tar.bz2 |
cmMakefile: Add configurations getter with empty configuration default
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r-- | Source/cmFileAPICodemodel.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 08db7c7..db6d675 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -423,20 +423,17 @@ Json::Value Codemodel::DumpPaths() Json::Value Codemodel::DumpConfigurations() { - std::vector<std::string> configs; + Json::Value configurations = Json::arrayValue; cmGlobalGenerator* gg = this->FileAPI.GetCMakeInstance()->GetGlobalGenerator(); auto makefiles = gg->GetMakefiles(); if (!makefiles.empty()) { - makefiles[0]->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); + std::vector<std::string> const& configs = + makefiles[0]->GetGeneratorConfigs(); + for (std::string const& config : configs) { + configurations.append(this->DumpConfiguration(config)); } } - Json::Value configurations = Json::arrayValue; - for (std::string const& config : configs) { - configurations.append(this->DumpConfiguration(config)); - } return configurations; } |