diff options
| author | Volker Krause <vkrause@kde.org> | 2022-03-25 15:40:58 +0100 | 
|---|---|---|
| committer | Volker Krause <vkrause@kde.org> | 2022-03-26 08:53:23 +0000 | 
| commit | 8f43932db6fc17f9cb9f0902e2342ad099755bbe (patch) | |
| tree | 0bf39774369fd01cd4460ef7317a9cc7a78bbdeb | |
| parent | d0730273c7f712a1a6aeb887def0d1ac4448aaa3 (diff) | |
| download | extra-cmake-modules-8f43932db6fc17f9cb9f0902e2342ad099755bbe.tar.gz extra-cmake-modules-8f43932db6fc17f9cb9f0902e2342ad099755bbe.tar.bz2  | |
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.
| -rw-r--r-- | tests/ECMAddTests/CMakeLists.txt | 8 | 
1 files changed, 7 insertions, 1 deletions
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}"          )  | 
