mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 23:00:07 -06:00
FileAPI: Add "multiConfig" parameter to index file
This commit is contained in:
@@ -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``
|
||||
|
||||
6
Help/release/dev/fileapi-multi-config.rst
Normal file
6
Help/release/dev/fileapi-multi-config.rst
Normal file
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user