mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-05 04:03:22 +03:00
Merge topic 'fileapi-toolchains-none'
a3b5591bbc fileapi: Omit NONE language entries from toolchains
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12206
This commit is contained in:
commit
741c67a43c
2 files changed
+7
No files matched your search
@@ -66,6 +66,9 @@ Json::Value Toolchains::DumpToolchains()
|
||||
|
||||
for (std::string const& lang :
|
||||
this->FileAPI.GetCMakeInstance()->GetState()->GetEnabledLanguages()) {
|
||||
if (lang == "NONE") {
|
||||
continue;
|
||||
}
|
||||
toolchains.append(this->DumpToolchain(lang));
|
||||
}
|
||||
|
||||
|
||||
@@ -48,14 +48,18 @@ def check_object_toolchains(o):
|
||||
|
||||
# Other platform-specific toolchains may exist (like RC on Windows).
|
||||
has_cxx_toolchain = False
|
||||
has_none_toolchain = False
|
||||
for toolchain in toolchains:
|
||||
assert is_dict(toolchain)
|
||||
assert "language" in toolchain
|
||||
if toolchain["language"] == "CXX":
|
||||
check_object_toolchain(toolchain, EXPECTED_TOOLCHAIN)
|
||||
has_cxx_toolchain = True
|
||||
if toolchain["language"] == "NONE":
|
||||
has_none_toolchain = True
|
||||
|
||||
assert has_cxx_toolchain
|
||||
assert not has_none_toolchain
|
||||
|
||||
def check_object_toolchain(o, expected):
|
||||
expected_keys = [
|
||||
|
||||
Reference in new issue
Block a user