summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-05 14:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-05 14:42:58 (GMT)
commit509a9409c3ac77103960177950d2d5c1ac3ade7a (patch)
tree4b4a2348a32ed5b06a2f3fda7b39e1e2a6fa3d59
parent5c0ef417b8a85546e50f7107b0038cbb7d108d20 (diff)
parente427c7c1d8077cad009f84eca9186efc584ac297 (diff)
downloadCMake-509a9409c3ac77103960177950d2d5c1ac3ade7a.zip
CMake-509a9409c3ac77103960177950d2d5c1ac3ade7a.tar.gz
CMake-509a9409c3ac77103960177950d2d5c1ac3ade7a.tar.bz2
Merge branch 'ios-variable' into release-3.14
Merge-request: !3051
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/variable/IOS.rst4
-rw-r--r--Modules/Platform/iOS-Initialize.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake4
4 files changed, 11 insertions, 0 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 83c88a5..7609597 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -259,6 +259,7 @@ Variables that Describe the System
/variable/CMAKE_SYSTEM_VERSION
/variable/CYGWIN
/variable/GHS-MULTI
+ /variable/IOS
/variable/MINGW
/variable/MSVC
/variable/MSVC10
diff --git a/Help/variable/IOS.rst b/Help/variable/IOS.rst
new file mode 100644
index 0000000..e5cc3f6
--- /dev/null
+++ b/Help/variable/IOS.rst
@@ -0,0 +1,4 @@
+IOS
+---
+
+Set to ``1`` when the target system (:variable:`CMAKE_SYSTEM_NAME`) is ``iOS``.
diff --git a/Modules/Platform/iOS-Initialize.cmake b/Modules/Platform/iOS-Initialize.cmake
index 41399a3..301ca4c 100644
--- a/Modules/Platform/iOS-Initialize.cmake
+++ b/Modules/Platform/iOS-Initialize.cmake
@@ -4,4 +4,6 @@ if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhone(OS|Simulator)")
message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an iOS SDK")
endif()
+set(IOS 1)
+
set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
index 7f31d94..f6c00b1 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
@@ -6,6 +6,10 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
endif()
+if(NOT IOS)
+ message(FATAL_ERROR "IOS variable is not set")
+endif()
+
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")