mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
Tests: Provide Apple inspection results to CMakeOnly and RunCMake tests
Re-order logic to make `CMake_TEST_XCODE_VERSION` and friends available to the `Tests/CMakeOnly` and `Tests/RunCMake` directories.
This commit is contained in:
+18
-17
@@ -271,14 +271,6 @@ if(BUILD_TESTING)
|
|||||||
find_package(Qt5Widgets QUIET NO_MODULE)
|
find_package(Qt5Widgets QUIET NO_MODULE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
|
||||||
add_subdirectory(CMakeLib)
|
|
||||||
endif()
|
|
||||||
add_subdirectory(CMakeOnly)
|
|
||||||
add_subdirectory(RunCMake)
|
|
||||||
|
|
||||||
add_subdirectory(FindPackageModeMakefileTest)
|
|
||||||
|
|
||||||
# Collect a list of all test build directories.
|
# Collect a list of all test build directories.
|
||||||
set(TEST_BUILD_DIRS)
|
set(TEST_BUILD_DIRS)
|
||||||
|
|
||||||
@@ -342,6 +334,16 @@ if(BUILD_TESTING)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMake_TEST_XCODE_VERSION AND CMAKE_OSX_SDKVERSION AND CMAKE_OSX_SDKPRODUCT)
|
||||||
|
if((NOT CMake_TEST_XCODE_VERSION VERSION_LESS 6.1) AND
|
||||||
|
((NOT CMAKE_OSX_SDKPRODUCT STREQUAL "Mac OS X") OR
|
||||||
|
(NOT CMAKE_OSX_SDKVERSION VERSION_LESS 10.10)))
|
||||||
|
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||||
|
set(CMake_TEST_XCODE_SWIFT 1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
|
# Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
|
||||||
# whichever is greater.
|
# whichever is greater.
|
||||||
set(CMAKE_LONG_TEST_TIMEOUT 1500)
|
set(CMAKE_LONG_TEST_TIMEOUT 1500)
|
||||||
@@ -352,6 +354,14 @@ if(BUILD_TESTING)
|
|||||||
set(CMAKE_LONG_TEST_TIMEOUT 1500)
|
set(CMAKE_LONG_TEST_TIMEOUT 1500)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||||
|
add_subdirectory(CMakeLib)
|
||||||
|
endif()
|
||||||
|
add_subdirectory(CMakeOnly)
|
||||||
|
add_subdirectory(RunCMake)
|
||||||
|
|
||||||
|
add_subdirectory(FindPackageModeMakefileTest)
|
||||||
|
|
||||||
add_test(NAME CMake.Copyright
|
add_test(NAME CMake.Copyright
|
||||||
COMMAND ${CMAKE_CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeCopyright.cmake)
|
COMMAND ${CMAKE_CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeCopyright.cmake)
|
||||||
|
|
||||||
@@ -380,15 +390,6 @@ if(BUILD_TESTING)
|
|||||||
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
|
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
|
||||||
set_tests_properties(MissingSourceFile PROPERTIES
|
set_tests_properties(MissingSourceFile PROPERTIES
|
||||||
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
|
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
|
||||||
if(CMake_TEST_XCODE_VERSION AND CMAKE_OSX_SDKVERSION AND CMAKE_OSX_SDKPRODUCT)
|
|
||||||
if((NOT CMake_TEST_XCODE_VERSION VERSION_LESS 6.1) AND
|
|
||||||
((NOT CMAKE_OSX_SDKPRODUCT STREQUAL "Mac OS X") OR
|
|
||||||
(NOT CMAKE_OSX_SDKVERSION VERSION_LESS 10.10)))
|
|
||||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
|
||||||
set(CMake_TEST_XCODE_SWIFT 1)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(CMAKE_Swift_COMPILER OR CMake_TEST_XCODE_SWIFT)
|
if(CMAKE_Swift_COMPILER OR CMake_TEST_XCODE_SWIFT)
|
||||||
ADD_TEST_MACRO(SwiftOnly SwiftOnly)
|
ADD_TEST_MACRO(SwiftOnly SwiftOnly)
|
||||||
if(CMake_TEST_XCODE_SWIFT)
|
if(CMake_TEST_XCODE_SWIFT)
|
||||||
|
|||||||
Reference in New Issue
Block a user