summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-31 15:26:08 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-31 15:26:08 (GMT)
commita1221905092c09603c0b59dd0ed05bfe9f1f22ef (patch)
tree58a3a7e0fff71f02f09d6b16893bf7f0601ea605 /Modules/CMakeDetermineCCompiler.cmake
parentc791fb12544926bc5870a61735dc2ec62940a6f6 (diff)
downloadCMake-a1221905092c09603c0b59dd0ed05bfe9f1f22ef.zip
CMake-a1221905092c09603c0b59dd0ed05bfe9f1f22ef.tar.gz
CMake-a1221905092c09603c0b59dd0ed05bfe9f1f22ef.tar.bz2
Xcode: Detect CURRENT_ARCH for use by generator
During compiler identification, extract the Xcode `CURRENT_ARCH` value and save it for later use by the Xcode generator in an internal compiler information variable. This will be useful to know the locations of object files when only one architecture is built.
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 5d9850d..3caccde 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -175,6 +175,11 @@ if(MSVC_C_ARCHITECTURE_ID)
"set(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})")
endif()
+if(CMAKE_C_XCODE_CURRENT_ARCH)
+ set(SET_CMAKE_XCODE_CURRENT_ARCH
+ "set(CMAKE_XCODE_CURRENT_ARCH ${CMAKE_C_XCODE_CURRENT_ARCH})")
+endif()
+
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake