diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2020-04-28 23:45:43 (GMT) |
---|---|---|
committer | kitware <kitware@dragnipur.kitware.com> | 2020-05-22 15:23:33 (GMT) |
commit | b698764a316d346e3c1bc33c7a88b5a09f144ad6 (patch) | |
tree | a75ad03857b7bbf7a57f70798c3c2795d0ed4e06 /Tests/RunCMake/FileAPI/codemodel-v2-check.py | |
parent | b3812c0e54c18d8fe9959624d8f09afc427a891e (diff) | |
download | CMake-b698764a316d346e3c1bc33c7a88b5a09f144ad6.zip CMake-b698764a316d346e3c1bc33c7a88b5a09f144ad6.tar.gz CMake-b698764a316d346e3c1bc33c7a88b5a09f144ad6.tar.bz2 |
Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2
Diffstat (limited to 'Tests/RunCMake/FileAPI/codemodel-v2-check.py')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-check.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index 9ee0c20..143e784 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -561,6 +561,20 @@ def gen_check_targets(c, g, inSource): read_codemodel_json_data("targets/generated_exe.json"), ] + if cxx_compiler_id in ['Clang', 'AppleClang', 'GNU', 'Intel', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode": + for e in expected: + if e["name"] == "cxx_exe": + if matches(g["name"], "^(Visual Studio |Ninja Multi-Config)"): + precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader_multigen.json") + else: + if ';' in os.environ.get("CMAKE_OSX_ARCHITECTURES", ""): + precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader_2arch.json") + else: + precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader.json") + e["compileGroups"] = precompile_header_data["compileGroups"] + e["sources"] = precompile_header_data["sources"] + e["sourceGroups"] = precompile_header_data["sourceGroups"] + if not os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "ipo_enabled.txt")): for e in expected: try: @@ -715,6 +729,7 @@ def check_object_codemodel(g): check_object_codemodel_configuration(c, g, inSource) return _check +cxx_compiler_id = sys.argv[2] assert is_dict(index) assert sorted(index.keys()) == ["cmake", "objects", "reply"] check_objects(index["objects"], index["cmake"]["generator"]) |