From 8f43932db6fc17f9cb9f0902e2342ad099755bbe Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 25 Mar 2022 15:40:58 +0100 Subject: Fix unit tests for ECMAddTests for Qt6 after db2adb479 If the tests use Qt we need to forward the Qt major version option as well. --- tests/ECMAddTests/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/ECMAddTests/CMakeLists.txt b/tests/ECMAddTests/CMakeLists.txt index e77b33f9..aa7e73a1 100644 --- a/tests/ECMAddTests/CMakeLists.txt +++ b/tests/ECMAddTests/CMakeLists.txt @@ -1,3 +1,9 @@ +if (QT_MAJOR_VERSION EQUAL "6") + set(QT_VERSION_OPT "-DBUILD_WITH_QT6=ON") +else() + set(QT_VERSION_OPT "-DBUILD_WITH_QT6=OFF") +endif() + macro(add_check NAME) string(REPLACE "." "/" dir "${NAME}") string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}") @@ -12,7 +18,7 @@ macro(add_check NAME) --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-project ${proj} - --build-options -DBUILD_TESTING:BOOL=ON + --build-options -DBUILD_TESTING:BOOL=ON ${QT_VERSION_OPT} ${${NAME}_EXTRA_OPTIONS} --test-command "${CMAKE_CTEST_COMMAND}" ) -- cgit v1.2.1