diff options
Diffstat (limited to 'Tests')
19 files changed, 91 insertions, 17 deletions
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt index 927ce3f..ea5fc0b 100644 --- a/Tests/Architecture/CMakeLists.txt +++ b/Tests/Architecture/CMakeLists.txt @@ -7,8 +7,8 @@ function(test_for_xcode4 result_var) execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE ov RESULT_VARIABLE rv ) - if("${rv}" STREQUAL "0") - if(ov MATCHES "^Xcode 4.[0-9].*$") + if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.") + if(NOT CMAKE_MATCH_1 VERSION_LESS 4) set(${result_var} 1 PARENT_SCOPE) endif() endif() diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 3af0fda..0687154 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -285,6 +285,8 @@ if(EXISTS "${link_depends_no_shared_check_txt}") file(STRINGS "${link_depends_no_shared_check_txt}" link_depends_no_shared_check LIMIT_COUNT 1) if("${link_depends_no_shared_check}" STREQUAL "0") message(STATUS "link_depends_no_shared_exe is older than link_depends_no_shared_lib as expected.") + elseif(XCODE AND NOT XCODE_VERSION VERSION_LESS 5) + message(STATUS "Known limitation: link_depends_no_shared_exe is newer than link_depends_no_shared_lib but we cannot stop Xcode ${XCODE_VERSION} from enforcing this dependency.") else() message(SEND_ERROR "Project did not rebuild properly: link_depends_no_shared_exe is newer than link_depends_no_shared_lib.") endif() diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index b4c6a07..8806ecd 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -7,8 +7,8 @@ function(test_for_xcode4 result_var) execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE ov RESULT_VARIABLE rv ) - if("${rv}" STREQUAL "0") - if(ov MATCHES "^Xcode 4.[0-9].*$") + if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.") + if(NOT CMAKE_MATCH_1 VERSION_LESS 4) set(${result_var} 1 PARENT_SCOPE) endif() endif() diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 739593c..691728a 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -22,11 +22,18 @@ endmacro() set(DESIRED_QT_VERSION 4) set(NO_QT4_MODULES "Qt3" "KDE3") +# ignore everything that has it's own test in Tests/Module/ +file(GLOB OWN_TEST_MODULES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/" "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/Find*") +foreach(FIND_MODULE IN LISTS OWN_TEST_MODULES) + string(REGEX REPLACE "^Find" "" _MOD_NAME "${FIND_MODULE}") + list(APPEND NO_FIND_MODULES "${_MOD_NAME}") +endforeach() + # These modules are named Find*.cmake, but are nothing that works in # find_package(). -set(NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage") +list(APPEND NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage") -foreach(FIND_MODULE ${FIND_MODULES}) +foreach(FIND_MODULE IN LISTS FIND_MODULES) string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}") list(FIND NO_QT4_MODULES ${MODULE_NAME} NO_QT4_INDEX) diff --git a/Tests/Contracts/Trilinos-10-6/CMakeLists.txt b/Tests/Contracts/Trilinos/CMakeLists.txt index 79ed669..f5757b5 100644 --- a/Tests/Contracts/Trilinos-10-6/CMakeLists.txt +++ b/Tests/Contracts/Trilinos/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8) -project(Trilinos-10-6) +project(Trilinos) include(ExternalProject) @@ -27,12 +27,12 @@ endif() message(STATUS "HOME='${HOME}'") if(NOT DEFINED url) - set(url "http://www.cmake.org/files/contracts/trilinos-10.6.1.tar.gz") + set(url "http://www.cmake.org/files/contracts/trilinos-11.4.1.tar.gz") endif() message(STATUS "url='${url}'") if(NOT DEFINED md5) - set(md5 "690230465dd21a76e3c6636fd07bd2f0") + set(md5 "28b6a3c7c0fb317b3a237997293faa8b") endif() message(STATUS "md5='${md5}'") diff --git a/Tests/Contracts/Trilinos-10-6/Dashboard.cmake.in b/Tests/Contracts/Trilinos/Dashboard.cmake.in index cc29502..93d4f61 100644 --- a/Tests/Contracts/Trilinos-10-6/Dashboard.cmake.in +++ b/Tests/Contracts/Trilinos/Dashboard.cmake.in @@ -14,7 +14,7 @@ set(ENV{CTEST_SITE} "${CTEST_SITE}") # Allow override of the environment on a per-client basis: # -set(ENV_SCRIPT "$ENV{CMAKE_CONTRACT_Trilinos_10_6_ENV_SCRIPT}") +set(ENV_SCRIPT "$ENV{CMAKE_CONTRACT_Trilinos_ENV_SCRIPT}") if(ENV_SCRIPT AND EXISTS "${ENV_SCRIPT}") include("${ENV_SCRIPT}") endif() @@ -49,7 +49,7 @@ endif() # execute_process(COMMAND "${CMAKE_CTEST_COMMAND}" - -S "${CTEST_SOURCE_DIRECTORY}/cmake/ctest/experimental_build_test.cmake" + -S "${CTEST_SOURCE_DIRECTORY}/cmake/tribits/ctest/experimental_build_test.cmake" -VV WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}" RESULT_VARIABLE rv diff --git a/Tests/Contracts/Trilinos-10-6/EnvScript.cmake b/Tests/Contracts/Trilinos/EnvScript.cmake index dacb704..dacb704 100644 --- a/Tests/Contracts/Trilinos-10-6/EnvScript.cmake +++ b/Tests/Contracts/Trilinos/EnvScript.cmake diff --git a/Tests/Contracts/Trilinos-10-6/Patch.cmake b/Tests/Contracts/Trilinos/Patch.cmake index 6c619ac..6c619ac 100644 --- a/Tests/Contracts/Trilinos-10-6/Patch.cmake +++ b/Tests/Contracts/Trilinos/Patch.cmake diff --git a/Tests/Contracts/Trilinos-10-6/RunTest.cmake b/Tests/Contracts/Trilinos/RunTest.cmake index 30124d8..d661a4c 100644 --- a/Tests/Contracts/Trilinos-10-6/RunTest.cmake +++ b/Tests/Contracts/Trilinos/RunTest.cmake @@ -4,4 +4,4 @@ set(dir "${CMAKE_CURRENT_BINARY_DIR}/Contracts/${project}") set(exe "${CMAKE_COMMAND}") set(args -P "${dir}/ValidateBuild.cmake") -set(Trilinos-10-6_RUN_TEST ${exe} ${args}) +set(Trilinos_RUN_TEST ${exe} ${args}) diff --git a/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in index 04bbf21..fa38ada 100644 --- a/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in +++ b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in @@ -20,10 +20,10 @@ message(STATUS "Found len='${len}' *.exe files") # Try to find the Teuchos unit tests executable: # -file(GLOB_RECURSE exe "${binary_dir}/Teuchos_UnitTest_UnitTests.exe") +file(GLOB_RECURSE exe "${binary_dir}/TeuchosCore_UnitTest_UnitTests.exe") list(LENGTH exe len) if(NOT len EQUAL 1) - message(FATAL_ERROR "len='${len}' is not the expected='1' (count of Teuchos_UnitTest_UnitTests.exe)") + message(FATAL_ERROR "len='${len}' is not the expected='1' (count of TeuchosCore_UnitTest_UnitTests.exe)") endif() message(STATUS "Found exe='${exe}'") @@ -31,7 +31,7 @@ message(STATUS "Found exe='${exe}'") # Try to run it: execute_process(COMMAND ${exe} RESULT_VARIABLE rv) if(NOT "${rv}" STREQUAL "0") - message(FATAL_ERROR "rv='${rv}' is not the expected='0' (result of running Teuchos_UnitTest_UnitTests.exe)") + message(FATAL_ERROR "rv='${rv}' is not the expected='0' (result of running TeuchosCore_UnitTest_UnitTests.exe)") endif() message(STATUS "Ran exe='${exe}' rv='${rv}'") diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 1f23b2a..72ae78f 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -159,7 +159,7 @@ set_property(TARGET testLibRequired APPEND PROPERTY $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>> # Test that the below is non-fatal $<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>> - $<INSTALL_INTERFACE:include/testLibIncludeRequired7> + $<INSTALL_INTERFACE:include/testLibIncludeRequired7;include/testLibIncludeRequired4> ) set_property(TARGET testLibRequired APPEND PROPERTY diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 4d8d7ed..47e7882 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -186,6 +186,11 @@ add_custom_target(check-part3 ALL -Dtest_alias_target_name=$<STREQUAL:$<TARGET_PROPERTY:Alias::SomeLib,NAME>,$<TARGET_PROPERTY:empty1,NAME>> -Dtest_early_termination_1=$<$<1:>: -Dtest_early_termination_2=$<$<1:>:, + -Dsystem_name=${CMAKE_HOST_SYSTEM_NAME} + -Dtest_platform_id=$<PLATFORM_ID> + -Dtest_platform_id_Linux=$<PLATFORM_ID:Linux> + -Dtest_platform_id_Windows=$<PLATFORM_ID:Windows> + -Dtest_platform_id_Darwin=$<PLATFORM_ID:Darwin> -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)" VERBATIM diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake index 74a596c..93ea487 100644 --- a/Tests/GeneratorExpression/check-part3.cmake +++ b/Tests/GeneratorExpression/check-part3.cmake @@ -26,3 +26,11 @@ check(test_alias_file_lib "1") check(test_alias_target_name "1") check(test_early_termination_1 "$<:") check(test_early_termination_2 "$<:,") +check(test_platform_id "${system_name}") +foreach(system Linux Windows Darwin) + if(system_name STREQUAL system) + check(test_platform_id_${system} 1) + else() + check(test_platform_id_${system} 0) + endif() +endforeach() diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt index 28569dd..37d7292 100644 --- a/Tests/MakeClean/ToClean/CMakeLists.txt +++ b/Tests/MakeClean/ToClean/CMakeLists.txt @@ -26,6 +26,18 @@ add_custom_command(OUTPUT ${ToClean_BINARY_DIR}/generated.txt add_custom_target(generate ALL DEPENDS ${ToClean_BINARY_DIR}/generated.txt) set(TOCLEAN_FILES ${TOCLEAN_FILES} "${ToClean_BINARY_DIR}/generated.txt") +# Create a custom command whose output should be cleaned, but whose name +# is not known until generate-time +set(copied_exe "$<TARGET_FILE_DIR:toclean>/toclean_copy${CMAKE_EXECUTABLE_SUFFIX}") +add_custom_command(TARGET toclean POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy $<TARGET_FILE:toclean> + ${copied_exe} + ) +set_property(DIRECTORY APPEND PROPERTY + ADDITIONAL_MAKE_CLEAN_FILES ${copied_exe}) +list(APPEND TOCLEAN_FILES "${ToClean_BINARY_DIR}/toclean_copy${CMAKE_EXECUTABLE_SUFFIX}") + # Configure a file listing these build-time-generated files. configure_file(${ToClean_SOURCE_DIR}/ToCleanFiles.cmake.in ${ToClean_BINARY_DIR}/ToCleanFiles.cmake @ONLY IMMEDIATE) diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt index 69e52ac..8ad693a 100644 --- a/Tests/QtAutomoc/CMakeLists.txt +++ b/Tests/QtAutomoc/CMakeLists.txt @@ -41,7 +41,7 @@ add_library(codeeditorLib STATIC codeeditor.cpp) add_library(privateSlot OBJECT private_slot.cpp) add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp - xyz.cpp yaf.cpp $<TARGET_OBJECTS:privateSlot>) + xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>) set_target_properties(foo codeeditorLib privateSlot PROPERTIES AUTOMOC TRUE) diff --git a/Tests/QtAutomoc/gadget.cpp b/Tests/QtAutomoc/gadget.cpp new file mode 100644 index 0000000..23d95fa --- /dev/null +++ b/Tests/QtAutomoc/gadget.cpp @@ -0,0 +1,4 @@ + +#include "gadget.h" + +#include "moc_gadget.cpp" diff --git a/Tests/QtAutomoc/gadget.h b/Tests/QtAutomoc/gadget.h new file mode 100644 index 0000000..7c688ee --- /dev/null +++ b/Tests/QtAutomoc/gadget.h @@ -0,0 +1,18 @@ + +#ifndef GADGET_H +#define GADGET_H + +#include <QObject> + +class Gadget +{ + Q_GADGET + Q_ENUMS(Type) +public: + enum Type { + Type0, + Type1 + }; +}; + +#endif diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt index 29103c9..93c0ab3 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt @@ -5,4 +5,13 @@ CMake Warning \(dev\) in CMakeLists.txt: Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its LINK_INTERFACE_LIBRARIES properties. + + INTERFACE_LINK_LIBRARIES: + + foo + + LINK_INTERFACE_LIBRARIES: + + bat + This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt index 5a5ad27..6370b24 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt @@ -5,4 +5,13 @@ CMake Warning \(dev\) in CMakeLists.txt: Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its LINK_INTERFACE_LIBRARIES properties. + + INTERFACE_LINK_LIBRARIES: + + foo + + LINK_INTERFACE_LIBRARIES: + + bat + This warning is for project developers. Use -Wno-dev to suppress it. |