migration(grantlee): add patch script to avoid QT_TESTCASE_BUILDDIR redefinition; add Grantlee parser smoke test
This commit is contained in:
1 parent
faa891b573
commit
56adad890c
3 files changed
+107
No files matched your search
@@ -113,6 +113,21 @@ else()
|
||||
message(STATUS "Grantlee5 not found; skipping codegen_grantlee target")
|
||||
endif()
|
||||
|
||||
# Smoke-test: parse all .grantlee templates in this directory to detect parse/render regressions
|
||||
if (TARGET Grantlee5::Templates)
|
||||
find_package(Qt6 COMPONENTS Core QUIET)
|
||||
if (Qt6_FOUND)
|
||||
set(QTCORE_TARGET Qt6::Core)
|
||||
else()
|
||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||
set(QTCORE_TARGET Qt5::Core)
|
||||
endif()
|
||||
|
||||
add_executable(grantlee_parser_smoke tests/GrantleeParserSmoke.cpp)
|
||||
target_link_libraries(grantlee_parser_smoke PRIVATE Grantlee5::Templates ${QTCORE_TARGET})
|
||||
add_test(NAME GrantleeParserSmoke COMMAND grantlee_parser_smoke ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
NGL_ADD_EXECUTABLE(ALL codegen
|
||||
main_grantlee.cpp
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user