diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-06-03 17:42:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-06-03 17:43:52 (GMT) |
commit | e4e09212c58995a6cfde7d101bc02fce0f7829be (patch) | |
tree | 219aa9a80e2c182d3be38d3cccf8f3809c585720 /Tests/CMakeLists.txt | |
parent | c9b75dcd734e2dd09eadbd9b16a6497bae95941c (diff) | |
parent | a4d8c64d10105fd4448ffde6a5d2fb74c1bb4f57 (diff) | |
download | CMake-e4e09212c58995a6cfde7d101bc02fce0f7829be.zip CMake-e4e09212c58995a6cfde7d101bc02fce0f7829be.tar.gz CMake-e4e09212c58995a6cfde7d101bc02fce0f7829be.tar.bz2 |
Merge branch 'master' into escape-regex-specials-in-path
Resolve conflicts in Tests/CTestTestMemcheck/CMakeLists.txt by combining
changes from both sides.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 77 |
1 files changed, 71 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 44e9450..ab28a95 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1000,21 +1000,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt") - if(QT4_WORKS AND QT_QTGUI_FOUND) - add_test(QtAutomoc ${CMAKE_CTEST_COMMAND} + find_package(Qt5Widgets QUIET NO_MODULE) + if(Qt5Widgets_FOUND) + add_test(Qt5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutomoc" - "${CMake_BINARY_DIR}/Tests/QtAutomoc" + "${CMake_BINARY_DIR}/Tests/Qt5Automoc" ${build_generator_args} --build-project QtAutomoc - --build-exe-dir "${CMake_BINARY_DIR}/Tests/QtAutomoc" + --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Automoc" --force-new-ctest-process - --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} + --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5 --test-command ${CMAKE_CTEST_COMMAND} -V ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc") + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Automoc") endif() if(QT4_WORKS AND QT_QTGUI_FOUND) + add_test(Qt4Automoc ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/QtAutomoc" + "${CMake_BINARY_DIR}/Tests/Qt4Automoc" + ${build_generator_args} + --build-project QtAutomoc + --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Automoc" + --force-new-ctest-process + --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4 + --test-command ${CMAKE_CTEST_COMMAND} -V + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Automoc") + add_test(Qt4Targets ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4Targets" @@ -1445,6 +1459,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ADD_TEST_MACRO(SBCS SBCS) endif() + if(NOT "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [6789]( |$)" + AND NOT CMAKE_TEST_GENERATOR_TOOLSET) + ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) + endif() + add_test(VSExternalInclude ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/VSExternalInclude" @@ -1492,6 +1511,29 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ unset(_last_test) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild") endif() + + if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio ([0-5]|[6-9][0-9])") + if(CMAKE_TEST_MAKEPROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") + set(MSBUILD_EXECUTABLE "${CMAKE_TEST_MAKEPROGRAM}") + else() + set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]") + set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]") + find_program(MSBUILD_EXECUTABLE NAMES msbuild HINTS ${_FDIR}/${_FVER}) + endif() + if(MSBUILD_EXECUTABLE) + add_test(NAME VSProjectInSubdir COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/VSProjectInSubdir" + "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-makeprogram "${MSBUILD_EXECUTABLE}" + --build-project VSProjectInSubdir + --build-target test) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir") + endif() + endif() endif() if (APPLE) @@ -1634,6 +1676,20 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # -S "${CMake_BINARY_DIR}/Tests/CTestScriptMode/CTestTestScriptMode.cmake" # ) + # A test for ctest_build() with targets in subdirectories + if(CMAKE_TEST_GENERATOR_TOOLSET) + set(CMAKE_TEST_GENERATOR_TOOLSET_SELECTION "-T;${CMAKE_TEST_GENERATOR_TOOLSET};") + else() + set(CMAKE_TEST_GENERATOR_TOOLSET_SELECTION) + endif() + configure_file("${CMake_SOURCE_DIR}/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake" @ONLY) + unset(CMAKE_TEST_GENERATOR_TOOLSET_SELECTION) + add_test(CTest.BuildCommand.ProjectInSubdir + ${CMAKE_CTEST_COMMAND} -S "${CMake_BINARY_DIR}/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake" + -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CTestBuildCommandProjectInSubdir/Nested") + set(CTEST_TEST_UPDATE 1) if(CTEST_TEST_UPDATE) # Test CTest Update with Subversion @@ -2082,6 +2138,15 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ add_test(CTestBatchTest ${CMAKE_CTEST_COMMAND} -B) + configure_file( + "${CMake_SOURCE_DIR}/Tests/CTestTestFdSetSize/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake" + @ONLY ESCAPE_QUOTES) + add_test(CTestTestFdSetSize ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake" -j20 -V --timeout 120 + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/testOutput.log" + ) + # Use macro, not function so that build can still be driven by CMake 2.4. # After 2.6 is required, this could be a function without the extra 'set' # calls. |