summaryrefslogtreecommitdiffstats
path: root/util/cmake/configurejson2cmake.py
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2019-08-26 16:15:56 +0200
committerAlexandru Croitor <[email protected]>2019-08-28 11:15:14 +0000
commit5a5dc6294b0eb5e32f99a903a85c66d0c871f274 (patch)
tree651e36ab52c944d6145d2643ef3ef2a216bb1dba /util/cmake/configurejson2cmake.py
parent486da5a84d467806a78247ad988de3fb01530043 (diff)
Augment conversion scripts with requirements for qttools
The libclang test is implemented as a custom FindWrapLibClang module. The module does mostly the same things as the configure test in qmake land. Change-Id: I965f284baf7daef074e22f033047c35a917c8808 Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'util/cmake/configurejson2cmake.py')
-rwxr-xr-xutil/cmake/configurejson2cmake.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py
index bede5934a5d..22e98a68644 100755
--- a/util/cmake/configurejson2cmake.py
+++ b/util/cmake/configurejson2cmake.py
@@ -32,6 +32,7 @@ import os.path
import re
import sys
from typing import Set, Union, List, Dict
+from textwrap import dedent
from helper import map_qt_library, featureName, map_platform, \
find_3rd_party_library_mapping, generate_find_package_info
@@ -80,6 +81,7 @@ def map_tests(test: str) -> str:
'fsgsbase': 'TEST_subarch_fsgsbase',
'gfni': 'TEST_subarch_gfni',
'ibt': 'TEST_subarch_ibt',
+ 'libclang': 'TEST_libclang',
'lwp': 'TEST_subarch_lwp',
'lzcnt': 'TEST_subarch_lzcnt',
'mmx': 'TEST_subarch_mmx',
@@ -590,6 +592,19 @@ def parseTest(ctx, test, data, cm_fh):
cm_fh.write(qmakeFixme)
cm_fh.write(")\n\n")
+ elif data["type"] == "libclang":
+ knownTests.add(test)
+
+ cm_fh.write("# {}\n".format(test))
+ lib_clang_lib = find_3rd_party_library_mapping("libclang")
+ cm_fh.write(generate_find_package_info(lib_clang_lib))
+ cm_fh.write(dedent("""
+ if(TARGET WrapLibClang::WrapLibClang)
+ set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
+ endif()
+ """))
+ cm_fh.write("\n")
+
elif data["type"] == "x86Simd":
knownTests.add(test)