Changeset View
Changeset View
Standalone View
Standalone View
templates/tests/CMakeLists.txt
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | |||||
94 | macro(GRANTLEE_TEMPLATES_UNIT_TESTS) | 94 | macro(GRANTLEE_TEMPLATES_UNIT_TESTS) | ||
95 | foreach(_testname ${ARGN}) | 95 | foreach(_testname ${ARGN}) | ||
96 | add_executable(${_testname}_exec | 96 | add_executable(${_testname}_exec | ||
97 | ${_testname}.cpp | 97 | ${_testname}.cpp | ||
98 | ) | 98 | ) | ||
99 | add_test(${_testname} ${_testname}_exec ) | 99 | add_test(${_testname} ${_testname}_exec ) | ||
100 | target_link_libraries(${_testname}_exec Grantlee5::Templates template_test_builtins) | 100 | target_link_libraries(${_testname}_exec Grantlee5::Templates template_test_builtins) | ||
101 | 101 | | |||
102 | if (Qt5Script_FOUND) | 102 | if (Qt5Qml_FOUND) | ||
103 | target_compile_definitions(${_testname}_exec PRIVATE HAVE_QTSCRIPT_LIB) | 103 | target_compile_definitions(${_testname}_exec PRIVATE HAVE_QTQML_LIB) | ||
104 | endif() | 104 | endif() | ||
105 | 105 | | |||
106 | set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" ) | 106 | set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" ) | ||
107 | endforeach(_testname) | 107 | endforeach(_testname) | ||
108 | endmacro(GRANTLEE_TEMPLATES_UNIT_TESTS) | 108 | endmacro(GRANTLEE_TEMPLATES_UNIT_TESTS) | ||
109 | 109 | | |||
110 | grantlee_templates_unit_tests( | 110 | grantlee_templates_unit_tests( | ||
111 | testsafestring | 111 | testsafestring | ||
112 | testbuiltins | 112 | testbuiltins | ||
113 | testloadertags | 113 | testloadertags | ||
114 | testdefaulttags | 114 | testdefaulttags | ||
115 | testcachingloader | 115 | testcachingloader | ||
116 | testfilters | 116 | testfilters | ||
117 | testgenerictypes | 117 | testgenerictypes | ||
118 | testgenericcontainers | 118 | testgenericcontainers | ||
119 | # benchmarks | 119 | # benchmarks | ||
120 | ) | 120 | ) | ||
121 | 121 | | |||
122 | if (Qt5Script_FOUND) | 122 | if (Qt5Qml_FOUND) | ||
123 | grantlee_templates_unit_tests( | 123 | grantlee_templates_unit_tests( | ||
124 | testscriptabletags | 124 | testscriptabletags | ||
125 | ) | 125 | ) | ||
126 | endif() | 126 | endif() | ||
127 | 127 | | |||
128 | if (Qt5LinguistTools_FOUND) | 128 | if (Qt5LinguistTools_FOUND) | ||
129 | grantlee_templates_unit_tests( | 129 | grantlee_templates_unit_tests( | ||
130 | testinternationalization | 130 | testinternationalization | ||
131 | ) | 131 | ) | ||
132 | endif() | 132 | endif() | ||
133 | 133 | | |||
134 | add_subdirectory(pluginpointertest) | 134 | add_subdirectory(pluginpointertest) |