summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-20 14:44:28 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-11-20 14:46:10 (GMT)
commit51c69fe5f88ea8ed262665b953f1202668ba9cf8 (patch)
tree004fa3ec0ac3bee098e9b2a4991a674dbce1f77f
parent5f630a934aa4b8616aa59988ea70c14065d3a08d (diff)
downloadCMake-51c69fe5f88ea8ed262665b953f1202668ba9cf8.zip
CMake-51c69fe5f88ea8ed262665b953f1202668ba9cf8.tar.gz
CMake-51c69fe5f88ea8ed262665b953f1202668ba9cf8.tar.bz2
FileAPI: Add "multiConfig" parameter to index file
-rw-r--r--Help/manual/cmake-file-api.7.rst4
-rw-r--r--Help/release/dev/fileapi-multi-config.rst6
-rw-r--r--Source/cmGlobalGenerator.cxx1
-rw-r--r--Tests/RunCMake/FileAPI/check_index.py5
4 files changed, 14 insertions, 2 deletions
diff --git a/Help/manual/cmake-file-api.7.rst b/Help/manual/cmake-file-api.7.rst
index 04b6ed2..12eecd9 100644
--- a/Help/manual/cmake-file-api.7.rst
+++ b/Help/manual/cmake-file-api.7.rst
@@ -199,6 +199,7 @@ The reply index file contains a JSON object:
"root": "/prefix/share/cmake-3.14"
},
"generator": {
+ "multiConfig": false,
"name": "Unix Makefiles"
}
},
@@ -267,6 +268,9 @@ The members are:
A JSON object describing the CMake generator used for the build.
It has members:
+ ``multiConfig``
+ A boolean specifying whether the generator supports multiple output
+ configurations.
``name``
A string specifying the name of the generator.
``platform``
diff --git a/Help/release/dev/fileapi-multi-config.rst b/Help/release/dev/fileapi-multi-config.rst
new file mode 100644
index 0000000..e0e2e16
--- /dev/null
+++ b/Help/release/dev/fileapi-multi-config.rst
@@ -0,0 +1,6 @@
+fileapi-multi-config
+--------------------
+
+* The :manual:`file API <cmake-file-api(7)>` index file now emits a
+ ``multiConfig`` flag specifying whether or not the generator supports
+ multiple output configurations.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d903289..e38066f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -124,6 +124,7 @@ Json::Value cmGlobalGenerator::GetJson() const
{
Json::Value generator = Json::objectValue;
generator["name"] = this->GetName();
+ generator["multiConfig"] = this->IsMultiConfig();
return generator;
}
#endif
diff --git a/Tests/RunCMake/FileAPI/check_index.py b/Tests/RunCMake/FileAPI/check_index.py
index cda7234..23b02e9 100644
--- a/Tests/RunCMake/FileAPI/check_index.py
+++ b/Tests/RunCMake/FileAPI/check_index.py
@@ -109,10 +109,11 @@ def check_cmake_generator(g):
name = g.get("name", None)
assert is_string(name)
if name.startswith("Visual Studio"):
- assert sorted(g.keys()) == ["name", "platform"]
+ assert sorted(g.keys()) == ["multiConfig", "name", "platform"]
assert is_string(g["platform"])
else:
- assert sorted(g.keys()) == ["name"]
+ assert sorted(g.keys()) == ["multiConfig", "name"]
+ assert is_bool(g["multiConfig"], matches(name, "^(Visual Studio |Xcode$)"))
def check_index_object(indexEntry, kind, major, minor, check):
assert is_dict(indexEntry)