diff options
author | Brad King <brad.king@kitware.com> | 2020-09-21 13:10:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-21 13:10:48 (GMT) |
commit | 64901e053ba8fcc7b641819d36510317ea74c282 (patch) | |
tree | e8c10b7d9106557f6e902f86ba17cb6d2a1d4921 /Modules | |
parent | c622cfdfff6ff273aaaca083893698b67d950f6a (diff) | |
parent | b8ecd4df5f9259f102d82011693eca6282be5ae6 (diff) | |
download | CMake-64901e053ba8fcc7b641819d36510317ea74c282.zip CMake-64901e053ba8fcc7b641819d36510317ea74c282.tar.gz CMake-64901e053ba8fcc7b641819d36510317ea74c282.tar.bz2 |
Merge topic 'xcode-12-new-build-system'
b8ecd4df5f ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"
fe258f6382 Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system"
1c3d2d0951 Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"
542884e527 Tests: Update RunCMake.XcodeProject cases for Xcode "new build system"
832a78be2d Tests: Update BuildDepends test for Xcode "new build system"
ff76c51ec3 Tests: Update RunCMake.file case with workaround for Xcode "new build system"
1806cdd17c Tests: Avoid duplicate custom commands for Xcode "new build system"
8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5229
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 12 | ||||
-rw-r--r-- | Modules/FetchContent/CMakeLists.cmake.in | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index b795784..8bbaf5a 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -3342,6 +3342,18 @@ function(ExternalProject_Add name) cmake_policy(GET CMP0114 cmp0114 PARENT_SCOPE # undocumented, do not use outside of CMake ) + if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12 AND NOT cmp0114 STREQUAL "NEW") + message(AUTHOR_WARNING + "Policy CMP0114 is not set to NEW. " + "In order to support the Xcode \"new build system\", " + "this project must be updated to set policy CMP0114 to NEW." + "\n" + "Since CMake is generating for the Xcode \"new build system\", " + "ExternalProject_Add will use policy CMP0114's NEW behavior anyway, " + "but the generated build system may not match what the project intends." + ) + set(cmp0114 "NEW") + endif() _ep_get_configuration_subdir_suffix(cfgdir) diff --git a/Modules/FetchContent/CMakeLists.cmake.in b/Modules/FetchContent/CMakeLists.cmake.in index 45e4df0..9516418 100644 --- a/Modules/FetchContent/CMakeLists.cmake.in +++ b/Modules/FetchContent/CMakeLists.cmake.in @@ -2,6 +2,7 @@ # file Copyright.txt or https://cmake.org/licensing for details. cmake_minimum_required(VERSION ${CMAKE_VERSION}) +cmake_policy(SET CMP0114 NEW) # We name the project and the target for the ExternalProject_Add() call # to something that will highlight to the user what we are working on if |