diff options
-rw-r--r-- | Help/release/3.13.rst | 9 | ||||
-rw-r--r-- | Help/release/3.14.rst | 10 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 14 | ||||
-rw-r--r-- | Modules/FindPython/Support.cmake | 31 | ||||
-rw-r--r-- | Modules/FindSWIG.cmake | 2 | ||||
-rw-r--r-- | Modules/FindXCTest.cmake | 19 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 9 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 14 | ||||
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c | 11 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/TopDir.c | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc | bin | 1829 -> 1829 bytes | |||
-rw-r--r-- | Tests/RunCMake/FileAPI/check_index.pyc | bin | 8146 -> 8146 bytes | |||
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 15 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/XCTestLookup.cmake | 3 |
18 files changed, 142 insertions, 20 deletions
diff --git a/Help/release/3.13.rst b/Help/release/3.13.rst index 1c58550ff..a8dd0baf7 100644 --- a/Help/release/3.13.rst +++ b/Help/release/3.13.rst @@ -278,3 +278,12 @@ Changes made since CMake 3.13.0 include the following. relying on the old behavior can be trivially fixed by specifying the path to the source tree (even if just ``.``) explicitly and continue to work with all versions of CMake. + +3.13.5 +------ + +* In CMake 3.13.0 through 3.13.4, calling :command:`target_link_libraries` + to add ``PRIVATE`` dependencies to a static library created in another + directory (under policy :policy:`CMP0079` ``NEW`` behavior) would + incorrectly propagate usage requirements of those dependencies to + dependents that link the static library. This has been fixed. diff --git a/Help/release/3.14.rst b/Help/release/3.14.rst index c20830475..8a251bd18 100644 --- a/Help/release/3.14.rst +++ b/Help/release/3.14.rst @@ -402,3 +402,13 @@ Changes made since CMake 3.14.0 include the following. * The :variable:`CMAKE_VS_PLATFORM_NAME_DEFAULT` variable was added to help toolchain files work with the :generator:`Visual Studio 16 2019` generator where the default platform now depends on the host platform. + +3.14.4 +------ + +* In CMake 3.14.0 through 3.14.3, calling :command:`target_link_libraries` + to add ``PRIVATE`` dependencies to a static library created in another + directory (under policy :policy:`CMP0079` ``NEW`` behavior) would + incorrectly propagate usage requirements of those dependencies to + dependents that link the static library. This has been fixed. + The bug also existed in 3.13.0 through 3.13.4 and is fixed in 3.13.5. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index b5cc4cfeb..552c2fd6f 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1048,11 +1048,17 @@ endfunction() # Some boost libraries may require particular set of compler features. # The very first one was `boost::fiber` introduced in Boost 1.62. # One can check required compiler features of it in -# `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`. +# - `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`; +# - `${Boost_ROOT}/libs/context/build/Jamfile.v2`. +# +# TODO (Re)Check compiler features on (every?) release ??? +# One may use the following command to get the files to check: +# +# $ find . -name Jamfile.v2 | grep build | xargs grep -l cxx1 # function(_Boost_COMPILER_FEATURES component _ret) - # Boost >= 1.62 and < 1.67 - if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700) + # Boost >= 1.62 + if(NOT Boost_VERSION VERSION_LESS 106200) set(_Boost_FIBER_COMPILER_FEATURES cxx_alias_templates cxx_auto_type @@ -1066,6 +1072,8 @@ function(_Boost_COMPILER_FEATURES component _ret) cxx_thread_local cxx_variadic_templates ) + # Compiler feature for `context` same as for `fiber`. + set(_Boost_CONTEXT_COMPILER_FEATURES ${_Boost_FIBER_COMPILER_FEATURES}) endif() string(TOUPPER ${component} uppercomponent) set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE) diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 1236bf8f8..544e62bc8 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -305,9 +305,9 @@ unset (_${_PYTHON_PREFIX}_CACHED_VARS) # first step, search for the interpreter if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) endif() set (_${_PYTHON_PREFIX}_HINTS "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV ${_PYTHON_PREFIX}_ROOT_DIR) @@ -548,9 +548,9 @@ endif() # second step, search for compiler (IronPython) if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Compiler) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_COMPILER) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER) endif() # IronPython specific artifacts @@ -659,15 +659,15 @@ endif() ## Development environment is not compatible with IronPython interpreter if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND NOT ${_PYTHON_PREFIX}_INTERPRETER_ID STREQUAL "IronPython") + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY + ${_PYTHON_PREFIX}_LIBRARY_RELEASE + ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE + ${_PYTHON_PREFIX}_LIBRARY_DEBUG + ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG + ${_PYTHON_PREFIX}_INCLUDE_DIR) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Development) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_LIBRARY ${_PYTHON_PREFIX}_INCLUDE_DIR) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY - ${_PYTHON_PREFIX}_LIBRARY_RELEASE - ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE - ${_PYTHON_PREFIX}_LIBRARY_DEBUG - ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG - ${_PYTHON_PREFIX}_INCLUDE_DIR) endif() # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES @@ -774,10 +774,11 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS # retrieve runtime library if (${_PYTHON_PREFIX}_LIBRARY_RELEASE) get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY) + get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES} NAMES_PER_DIR - HINTS ${_${_PYTHON_PREFIX}_PATH} ${_${_PYTHON_PREFIX}_HINTS} + HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} PATH_SUFFIXES bin NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH) @@ -917,6 +918,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS # retrieve runtime library if (${_PYTHON_PREFIX}_LIBRARY_RELEASE) get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY) + get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} python${_${_PYTHON_PREFIX}_VERSION}mu @@ -924,7 +926,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS python${_${_PYTHON_PREFIX}_VERSION}u python${_${_PYTHON_PREFIX}_VERSION} NAMES_PER_DIR - HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} + HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} PATH_SUFFIXES bin) endif() @@ -960,10 +962,11 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS endif() if (${_PYTHON_PREFIX}_LIBRARY_DEBUG) get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_DEBUG}" DIRECTORY) + get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}_d NAMES_PER_DIR - HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} + HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} PATH_SUFFIXES bin) endif() endif() @@ -1127,9 +1130,9 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS endif() if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Interpreter_FOUND) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) if (${_PYTHON_PREFIX}_FIND_REQUIRED_NumPy) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) endif() execute_process( COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c @@ -1158,6 +1161,10 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte set(${_PYTHON_PREFIX}_NumPy_VERSION "${_${_PYTHON_PREFIX}_NumPy_VERSION}") endif() endif() + # final step: set NumPy founded only if Development component is founded as well + if (NOT ${_PYTHON_PREFIX}_Development_FOUND) + set(${_PYTHON_PREFIX}_NumPy_FOUND FALSE) + endif() endif() # final validation diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index fc0ed009d..96b254f92 100644 --- a/Modules/FindSWIG.cmake +++ b/Modules/FindSWIG.cmake @@ -26,7 +26,7 @@ to be found can be changed from the command line by means of setting SWIG_EXECUTABLE #]=======================================================================] -find_program(SWIG_EXECUTABLE NAMES swig3.0 swig2.0 swig) +find_program(SWIG_EXECUTABLE NAMES swig4.0 swig3.0 swig2.0 swig) if(SWIG_EXECUTABLE) execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib diff --git a/Modules/FindXCTest.cmake b/Modules/FindXCTest.cmake index 849733661..15721e184 100644 --- a/Modules/FindXCTest.cmake +++ b/Modules/FindXCTest.cmake @@ -61,6 +61,22 @@ The following variables are set by including this module: #]=======================================================================] +set(_PRESERVED_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}") + +if(CMAKE_EFFECTIVE_SYSTEM_NAME STREQUAL "Apple" + AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # Non-macos systems set the CMAKE_FIND_ROOT_PATH_MODE to "ONLY" which + # restricts the search paths too much to find XCTest.framework. In + # contrast to the regular system frameworks which reside within the + # SDK direectory the XCTest framework is located in the respective + # platform directory which is not added to the CMAKE_FIND_ROOT_PATH + # (only to CMAKE_SYSTEM_FRAMEWORK_PATH) and therefore not searched. + # + # Until this is properly addressed, temporaily add the platform + # directory to CMAKE_FIND_ROOT_PATH. + list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}/../..") +endif() + find_path(XCTest_INCLUDE_DIR NAMES "XCTest/XCTest.h" DOC "XCTest include directory") @@ -71,6 +87,9 @@ find_library(XCTest_LIBRARY DOC "XCTest Framework library") mark_as_advanced(XCTest_LIBRARY) +set(CMAKE_FIND_ROOT_PATH "${_PRESERVED_CMAKE_FIND_ROOT_PATH}") +unset(_PRESERVED_CMAKE_FIND_ROOT_PATH) + execute_process( COMMAND xcrun --find xctest OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d77434526..34dcc7994 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 14) -set(CMake_VERSION_PATCH 3) +set(CMake_VERSION_PATCH 4) #set(CMake_VERSION_RC 0) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 3892011a5..037d4157a 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1040,7 +1040,14 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName, } searchDirs.emplace_back("/Debug"); #if defined(__APPLE__) - std::string app = "/Debug/" + targetName + ".app"; + std::string app = "/" + targetName + ".app"; + if (config && config[0]) { + std::string tmp = "/"; + tmp += config + app; + searchDirs.push_back(std::move(tmp)); + } + std::string tmp = "/Debug" + app; + searchDirs.emplace_back(std::move(tmp)); searchDirs.push_back(std::move(app)); #endif searchDirs.emplace_back("/Development"); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index cbc01035f..becc42433 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -537,6 +537,20 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd() std::string const& linkCmd = mf->GetRequiredDefinition(linkCmdVar); cmSystemTools::ExpandListArgument(linkCmd, linkCmds); } +#ifdef __APPLE__ + // On macOS ranlib truncates the fractional part of the static archive + // file modification time. If the archive and at least one contained + // object file were created within the same second this will make look + // the archive older than the object file. On subsequent ninja runs this + // leads to re-achiving and updating dependent targets. + // As a work-around we touch the archive after ranlib (see #19222). + { + std::string cmakeCommand = + this->GetLocalGenerator()->ConvertToOutputFormat( + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); + linkCmds.push_back(cmakeCommand + " -E touch $TARGET_FILE"); + } +#endif return linkCmds; } case cmStateEnums::SHARED_LIBRARY: diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 5c7b95cb1..3883b5228 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -456,8 +456,8 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(libRef, llt); - if (cmGeneratorExpression::IsValidTargetName(libRef) || - cmGeneratorExpression::Find(libRef) != std::string::npos) { + if (cmGeneratorExpression::IsValidTargetName(lib) || + cmGeneratorExpression::Find(lib) != std::string::npos) { configLib = "$<LINK_ONLY:" + configLib + ">"; } this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 85ce1f785..5c704ac83 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -134,11 +134,15 @@ assert_property(newsignature1 LINK_LIBRARIES "depC;depB;subdirlib") #---------------------------------------------------------------------------- # Test cross-directory linking. cmake_policy(PUSH) +cmake_policy(SET CMP0022 NEW) cmake_policy(SET CMP0079 NEW) add_executable(TopDir TopDir.c) add_subdirectory(SubDirA) add_subdirectory(SubDirB) target_link_libraries(SubDirB TopDirImported) +add_subdirectory(SubDirC) +target_link_libraries(SubDirC PRIVATE SubDirC2) +target_link_libraries(TopDir SubDirC) add_library(TopDirImported IMPORTED INTERFACE) target_compile_definitions(TopDirImported INTERFACE DEF_TopDirImported) cmake_policy(POP) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt new file mode 100644 index 000000000..54bcc5174 --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(SubDirC STATIC SubDirC.c) + +add_library(SubDirC1 INTERFACE) +target_compile_definitions(SubDirC1 INTERFACE DEF_SubDirC1) + +add_library(SubDirC2 INTERFACE) +target_compile_definitions(SubDirC2 INTERFACE DEF_SubDirC2) + +target_link_libraries(SubDirC PRIVATE SubDirC1) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c new file mode 100644 index 000000000..c5536dccd --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c @@ -0,0 +1,11 @@ +#ifndef DEF_SubDirC1 +# error "DEF_SubDirC1 not defined" +#endif +#ifndef DEF_SubDirC2 +# error "DEF_SubDirC2 not defined" +#endif + +int SubDirC(void) +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/TopDir.c b/Tests/CMakeCommands/target_link_libraries/TopDir.c index 4706bb94e..d8066e5ca 100644 --- a/Tests/CMakeCommands/target_link_libraries/TopDir.c +++ b/Tests/CMakeCommands/target_link_libraries/TopDir.c @@ -7,6 +7,12 @@ #ifdef DEF_TopDirImported # error "DEF_TopDirImported is defined but should not be!" #endif +#ifdef DEF_SubDirC1 +# error "DEF_SubDirC1 defined but should not be" +#endif +#ifdef DEF_SubDirC2 +# error "DEF_SubDirC2 defined but should not be" +#endif int main(void) { diff --git a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc Binary files differindex 7a757043e..532a609e6 100644 --- a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc +++ b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc diff --git a/Tests/RunCMake/FileAPI/check_index.pyc b/Tests/RunCMake/FileAPI/check_index.pyc Binary files differindex 6c069b73b..f88b57333 100644 --- a/Tests/RunCMake/FileAPI/check_index.pyc +++ b/Tests/RunCMake/FileAPI/check_index.pyc diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 4918f7ca4..191f56dd7 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -256,4 +256,19 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 8) deployment_target_test(watchOS watchsimulator) endif() +if(XCODE_VERSION VERSION_GREATER_EQUAL 8) + function(xctest_lookup_test SystemName SDK) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XCTestLookup-${SDK}-build) + set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}") + + run_cmake(XCTestLookup) + endfunction() + + xctest_lookup_test(Darwin macosx) + xctest_lookup_test(iOS iphoneos) + xctest_lookup_test(iOS iphonesimulator) + xctest_lookup_test(tvOS appletvos) + xctest_lookup_test(tvOS appletvsimulator) +endif() + # Please add macOS-only tests above before the device-specific tests. diff --git a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake b/Tests/RunCMake/XcodeProject/XCTestLookup.cmake new file mode 100644 index 000000000..77676e5bd --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XCTestLookup.cmake @@ -0,0 +1,3 @@ +enable_language(C) + +find_package(XCTest REQUIRED) |