diff options
author | Brad King <brad.king@kitware.com> | 2018-11-01 14:37:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-12-12 11:40:10 (GMT) |
commit | b83fe27d8d3f25ed6e229270966b8323f5fc3ae5 (patch) | |
tree | ec345eec5c2d84087dabff361888d463d7ce41d0 /Tests/RunCMake/FileAPI | |
parent | 7ee0abbde1656b07eb28ddacca3d22bb7aafdbd8 (diff) | |
download | CMake-b83fe27d8d3f25ed6e229270966b8323f5fc3ae5.zip CMake-b83fe27d8d3f25ed6e229270966b8323f5fc3ae5.tar.gz CMake-b83fe27d8d3f25ed6e229270966b8323f5fc3ae5.tar.bz2 |
fileapi: Report cmake generator in reply index file
Diffstat (limited to 'Tests/RunCMake/FileAPI')
-rw-r--r-- | Tests/RunCMake/FileAPI/check_index.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/FileAPI/check_index.py b/Tests/RunCMake/FileAPI/check_index.py index 4d90d59..d8eaecb 100644 --- a/Tests/RunCMake/FileAPI/check_index.py +++ b/Tests/RunCMake/FileAPI/check_index.py @@ -23,9 +23,10 @@ def is_string(x): def check_cmake(cmake): assert is_dict(cmake) - assert sorted(cmake.keys()) == ["paths", "version"] + assert sorted(cmake.keys()) == ["generator", "paths", "version"] check_cmake_version(cmake["version"]) check_cmake_paths(cmake["paths"]) + check_cmake_generator(cmake["generator"]) def check_cmake_version(v): assert is_dict(v) @@ -45,6 +46,16 @@ def check_cmake_paths(v): assert is_string(v["ctest"]) assert is_string(v["root"]) +def check_cmake_generator(g): + assert is_dict(g) + name = g.get("name", None) + assert is_string(name) + if name.startswith("Visual Studio"): + assert sorted(g.keys()) == ["name", "platform"] + assert is_string(g["platform"]) + else: + assert sorted(g.keys()) == ["name"] + def check_index_object(indexEntry, kind, major, minor, check): assert is_dict(indexEntry) assert sorted(indexEntry.keys()) == ["jsonFile", "kind", "version"] |