diff options
author | Brad King <brad.king@kitware.com> | 2014-02-04 18:34:54 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-02-04 18:34:54 (GMT) |
commit | f748b59e2057d73a25448378442d70b420ed7698 (patch) | |
tree | 0035234f8941db728f48c6485da9e5575aa34fbc /Tests | |
parent | 01a41bc98ca8f2451e69fde4ac513b57276809ff (diff) | |
parent | 6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774 (diff) | |
download | CMake-f748b59e2057d73a25448378442d70b420ed7698.zip CMake-f748b59e2057d73a25448378442d70b420ed7698.tar.gz CMake-f748b59e2057d73a25448378442d70b420ed7698.tar.bz2 |
Merge topic 'fix-Qt-autogen'
6053ce22 QtAutogen: Make uic work even when the source is in a subdir.
1fc9ecfa FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/Qt4And5Automoc/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.cpp (renamed from Tests/QtAutogen/uiconly.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.h (renamed from Tests/QtAutogen/uiconly.h) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.ui (renamed from Tests/QtAutogen/uiconly.ui) | 0 |
6 files changed, 21 insertions, 4 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2807f97..1e04f2f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1191,6 +1191,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5Automoc") + add_test(Qt4And5AutomocReverse ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" + "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse" + ${build_generator_args} + --build-project Qt4And5Automoc + --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse" + --force-new-ctest-process + --build-options ${build_options} -DQT_REVERSE_FIND_ORDER=1 + --test-command ${CMAKE_CTEST_COMMAND} -V + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") endif() endif() diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index 61d5743..ad74961 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -2,8 +2,13 @@ cmake_minimum_required(VERSION 2.8.12) project(Qt4And5Automoc) -find_package(Qt4 REQUIRED) -find_package(Qt5Core REQUIRED) +if (QT_REVERSE_FIND_ORDER) + find_package(Qt5Core REQUIRED) + find_package(Qt4 REQUIRED) +else() + find_package(Qt4 REQUIRED) + find_package(Qt5Core REQUIRED) +endif() set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 515bf5b..546ed02 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -88,6 +88,6 @@ target_link_libraries(empty no_link_language) add_library(no_link_language STATIC empty.h) set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) -qtx_wrap_cpp(uicOnlyMoc uiconly.h) -add_executable(uiconly uiconly.cpp ${uicOnlyMoc}) +qtx_wrap_cpp(uicOnlyMoc sub/uiconly.h) +add_executable(uiconly sub/uiconly.cpp ${uicOnlyMoc}) target_link_libraries(uiconly ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/uiconly.cpp b/Tests/QtAutogen/sub/uiconly.cpp index cdb3318..cdb3318 100644 --- a/Tests/QtAutogen/uiconly.cpp +++ b/Tests/QtAutogen/sub/uiconly.cpp diff --git a/Tests/QtAutogen/uiconly.h b/Tests/QtAutogen/sub/uiconly.h index 9e21f82..9e21f82 100644 --- a/Tests/QtAutogen/uiconly.h +++ b/Tests/QtAutogen/sub/uiconly.h diff --git a/Tests/QtAutogen/uiconly.ui b/Tests/QtAutogen/sub/uiconly.ui index 13fb832..13fb832 100644 --- a/Tests/QtAutogen/uiconly.ui +++ b/Tests/QtAutogen/sub/uiconly.ui |