summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-03 11:34:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-03 11:34:11 (GMT)
commit6b246f91985024f50eb0b8d97cd54276d3b08618 (patch)
tree7ef087b98815115f1e430d984e7780a249a6d3b1 /Modules
parentbc27f26fbcc77337103f1af6fe859c031a083e29 (diff)
parent2af6857562ec4d3ac3055f3e9db272049bb3134f (diff)
downloadCMake-6b246f91985024f50eb0b8d97cd54276d3b08618.zip
CMake-6b246f91985024f50eb0b8d97cd54276d3b08618.tar.gz
CMake-6b246f91985024f50eb0b8d97cd54276d3b08618.tar.bz2
Merge topic 'darwin-init-var-cleanup'
2af6857562 Darwin: prefix internal osx variables with "_" to hide them from users Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4967
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 80e9a40..aa0e554 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -62,10 +62,10 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
# Find installed SDKs in either Xcode-4.3+ or pre-4.3 SDKs directory.
set(_CMAKE_OSX_SDKS_DIR "")
if(OSX_DEVELOPER_ROOT)
- foreach(d Platforms/MacOSX.platform/Developer/SDKs SDKs)
- file(GLOB _CMAKE_OSX_SDKS ${OSX_DEVELOPER_ROOT}/${d}/*)
+ foreach(_d Platforms/MacOSX.platform/Developer/SDKs SDKs)
+ file(GLOB _CMAKE_OSX_SDKS ${OSX_DEVELOPER_ROOT}/${_d}/*)
if(_CMAKE_OSX_SDKS)
- set(_CMAKE_OSX_SDKS_DIR ${OSX_DEVELOPER_ROOT}/${d})
+ set(_CMAKE_OSX_SDKS_DIR ${OSX_DEVELOPER_ROOT}/${_d})
break()
endif()
endforeach()
@@ -88,10 +88,10 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
# pick an SDK that works
set(_CMAKE_OSX_SYSROOT_DEFAULT)
- foreach(ver ${CMAKE_OSX_DEPLOYMENT_TARGET}
- ${_CURRENT_OSX_VERSION}
- ${_CMAKE_OSX_LATEST_SDK_VERSION})
- set(_CMAKE_OSX_DEPLOYMENT_TARGET ${ver})
+ foreach(_ver ${CMAKE_OSX_DEPLOYMENT_TARGET}
+ ${_CURRENT_OSX_VERSION}
+ ${_CMAKE_OSX_LATEST_SDK_VERSION})
+ set(_CMAKE_OSX_DEPLOYMENT_TARGET ${_ver})
set(_CMAKE_OSX_SDKS_VER ${_CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CMAKE_OSX_DEPLOYMENT_TARGET}})
set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_CHECK}")
@@ -113,8 +113,8 @@ endif()
# Set cache variable - end user may change this during ccmake or cmake-gui configure.
# Choose the type based on the current value.
set(_CMAKE_OSX_SYSROOT_TYPE STRING)
-foreach(v CMAKE_OSX_SYSROOT _CMAKE_OSX_SYSROOT_DEFAULT)
- if("x${${v}}" MATCHES "/")
+foreach(_v CMAKE_OSX_SYSROOT _CMAKE_OSX_SYSROOT_DEFAULT)
+ if("x${${_v}}" MATCHES "/")
set(_CMAKE_OSX_SYSROOT_TYPE PATH)
break()
endif()