summaryrefslogtreecommitdiff
path: root/Modules/Platform/Darwin-GNU.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform/Darwin-GNU.cmake')
-rw-r--r--Modules/Platform/Darwin-GNU.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index 8a50a6a..d953503 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -24,8 +24,8 @@ macro(__darwin_compiler_gnu lang)
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
endmacro()
-macro(cmake_gnu_has_isysroot lang)
- if("x${CMAKE_${lang}_HAS_ISYSROOT}" STREQUAL "x")
+macro(cmake_gnu_set_sysroot_flag lang)
+ if(NOT DEFINED CMAKE_${lang}_SYSROOT_FLAG)
set(_doc "${lang} compiler has -isysroot")
message(STATUS "Checking whether ${_doc}")
execute_process(
@@ -35,11 +35,12 @@ macro(cmake_gnu_has_isysroot lang)
)
if("${_gcc_help}" MATCHES "isysroot")
message(STATUS "Checking whether ${_doc} - yes")
- set(CMAKE_${lang}_HAS_ISYSROOT 1)
+ set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
else()
message(STATUS "Checking whether ${_doc} - no")
- set(CMAKE_${lang}_HAS_ISYSROOT 0)
+ set(CMAKE_${lang}_SYSROOT_FLAG "")
endif()
+ set(CMAKE_${lang}_SYSROOT_FLAG_CODE "set(CMAKE_${lang}_SYSROOT_FLAG \"${CMAKE_${lang}_SYSROOT_FLAG}\")")
endif()
endmacro()
@@ -59,6 +60,6 @@ macro(cmake_gnu_set_osx_deployment_target_flag lang)
message(STATUS "Checking whether ${_doc} - no")
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "")
endif()
- set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG_CODE "SET(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG \"${CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG}\")")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG_CODE "set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG \"${CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG}\")")
endif()
endmacro()