summaryrefslogtreecommitdiffstats
path: root/Source/cmFileAPICodemodel.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-03 13:37:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-03 13:42:15 (GMT)
commit1f7bd0032253296413770567a90a0a88b6cccb34 (patch)
tree4ad8653e9614c721ed3ce37a09b30be2d2e05159 /Source/cmFileAPICodemodel.cxx
parentc4f2f011084a5e64e6f3745071ea56a286758682 (diff)
parent10507c6dc0918777d43b3f961bd18162866f0bbb (diff)
downloadCMake-1f7bd0032253296413770567a90a0a88b6cccb34.zip
CMake-1f7bd0032253296413770567a90a0a88b6cccb34.tar.gz
CMake-1f7bd0032253296413770567a90a0a88b6cccb34.tar.bz2
Merge topic 'add-non-empty-configurations-getter'
10507c6dc0 cmMakefile: Add configurations getter with empty configuration default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3759
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r--Source/cmFileAPICodemodel.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index 2aa7fe2..3ac769c 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;
}