summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-08-07 14:30:52 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-08-09 13:44:11 (GMT)
commit52676e37941ee6b31139e86ca2dfb28a80c648ae (patch)
tree9f2bc4718e6276e38c8f796e05b70ff969e222d6 /Tests
parente7fb85d00d3a550d0f05e2288e18b43dc572900b (diff)
downloadCMake-52676e37941ee6b31139e86ca2dfb28a80c648ae.zip
CMake-52676e37941ee6b31139e86ca2dfb28a80c648ae.tar.gz
CMake-52676e37941ee6b31139e86ca2dfb28a80c648ae.tar.bz2
Autogen: Tests: Use non inverting Qt version tests
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutogen/AutogenTest.cmake4
-rw-r--r--Tests/QtAutogen/CommonTests.cmake8
-rw-r--r--Tests/QtAutogen/DefinesTest/CMakeLists.txt2
-rw-r--r--Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/SameName/CMakeLists.txt2
-rw-r--r--Tests/QtAutogen/TestMacros.cmake2
6 files changed, 11 insertions, 11 deletions
diff --git a/Tests/QtAutogen/AutogenTest.cmake b/Tests/QtAutogen/AutogenTest.cmake
index 8c0a14f..3969a89 100644
--- a/Tests/QtAutogen/AutogenTest.cmake
+++ b/Tests/QtAutogen/AutogenTest.cmake
@@ -6,7 +6,7 @@ if(QT_QMAKE_EXECUTABLE)
list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR})
endif()
-if (QT_TEST_VERSION STREQUAL 4)
+if (QT_TEST_VERSION EQUAL 4)
find_package(Qt4 REQUIRED)
include(UseQt4)
@@ -21,7 +21,7 @@ if (QT_TEST_VERSION STREQUAL 4)
qt4_generate_moc(${ARGN})
endmacro()
-elseif(QT_TEST_VERSION STREQUAL 5)
+elseif(QT_TEST_VERSION EQUAL 5)
find_package(Qt5Widgets REQUIRED)
set(QT_QTCORE_TARGET Qt5::Core)
diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake
index a3f8f39..01ed7e9 100644
--- a/Tests/QtAutogen/CommonTests.cmake
+++ b/Tests/QtAutogen/CommonTests.cmake
@@ -12,7 +12,7 @@ if(QT_TEST_ALLOW_QT_MACROS)
endif()
ADD_AUTOGEN_TEST(UicSkipSource)
ADD_AUTOGEN_TEST(RccSkipSource)
-if(NOT QT_TEST_VERSION STREQUAL 4)
+if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
endif()
ADD_AUTOGEN_TEST(MocDepends)
@@ -23,13 +23,13 @@ endif()
if(QT_TEST_ALLOW_QT_MACROS)
ADD_AUTOGEN_TEST(MocCMP0071)
endif()
-if(NOT QT_TEST_VERSION STREQUAL 4)
+if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(MocOsMacros)
endif()
ADD_AUTOGEN_TEST(UicInclude uicInclude)
ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface)
ADD_AUTOGEN_TEST(ObjectLibrary someProgram)
-if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4))
+if(APPLE AND (QT_TEST_VERSION GREATER 4))
ADD_AUTOGEN_TEST(MacOsFW)
endif()
ADD_AUTOGEN_TEST(Parallel parallel)
@@ -42,7 +42,7 @@ ADD_AUTOGEN_TEST(SameName sameName)
ADD_AUTOGEN_TEST(StaticLibraryCycle slc)
# Rerun tests
ADD_AUTOGEN_TEST(RerunMocBasic)
-if(NOT QT_TEST_VERSION STREQUAL 4)
+if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(RerunMocPlugin)
endif()
ADD_AUTOGEN_TEST(RerunRccDepends)
diff --git a/Tests/QtAutogen/DefinesTest/CMakeLists.txt b/Tests/QtAutogen/DefinesTest/CMakeLists.txt
index de22845..3761dd8 100644
--- a/Tests/QtAutogen/DefinesTest/CMakeLists.txt
+++ b/Tests/QtAutogen/DefinesTest/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project(DefinesTest)
# Qt4 only definitions test
-if(NOT QT_TEST_VERSION STREQUAL 4)
+if(NOT QT_TEST_VERSION EQUAL 4)
message(ERROR "Invalid Qt test version. This test is for Qt4 only.")
endif()
diff --git a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt
index bc0085f..ca22aeb 100644
--- a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt
+++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt
@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.10)
project(MocPlugin)
include("../../AutogenTest.cmake")
-if (NOT QT_TEST_VERSION STREQUAL 5)
- message(SEND_ERROR "Invalid Qt version specified.")
+if (QT_TEST_VERSION LESS 5)
+ message(SEND_ERROR "Qt 5 or higher required.")
endif()
set(CMAKE_AUTOMOC_DEPEND_FILTERS
diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt
index c7d6e52..931e40f 100644
--- a/Tests/QtAutogen/SameName/CMakeLists.txt
+++ b/Tests/QtAutogen/SameName/CMakeLists.txt
@@ -28,7 +28,7 @@ set_target_properties(sameName PROPERTIES
)
# Set different compression levels
-if (QT_TEST_VERSION STREQUAL 4)
+if (QT_TEST_VERSION EQUAL 4)
set(rccCompress "-compress")
else()
set(rccCompress "--compress")
diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake
index 8e4bea2..0e27188 100644
--- a/Tests/QtAutogen/TestMacros.cmake
+++ b/Tests/QtAutogen/TestMacros.cmake
@@ -50,7 +50,7 @@ if(NON_ASCII_BDIR)
# Qt4 moc does not support utf8 paths in _parameter files generated by
# qtx_wrap_cpp
# https://bugreports.qt.io/browse/QTBUG-35480
- if(QT_TEST_VERSION STREQUAL 4)
+ if(QT_TEST_VERSION EQUAL 4)
set(QT_TEST_ALLOW_QT_MACROS FALSE)
endif()
# On windows qtx_wrap_cpp also fails in Qt5 when used on a path that