Commit 0cce556b authored by Brad King's avatar Brad King

Xcode: Use sysroot and deployment target to identify compiler

Use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set the Xcode
SDKROOT and MACOSX_DEPLOYMENT_TARGET build settings.  This is necessary
because some versions of Xcode select a different compiler based on
these settings.  We need to make sure the compiler identified during
language initialization matches what will be used for the actual build.
parent 0200d0a9
......@@ -215,6 +215,17 @@ Id flags: ${testflags}
else()
set(id_toolset "")
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(id_deployment_target
"MACOSX_DEPLOYMENT_TARGET = \"${CMAKE_OSX_DEPLOYMENT_TARGET}\";")
else()
set(id_deployment_target "")
endif()
if(CMAKE_OSX_SYSROOT)
set(id_sdkroot "SDKROOT = \"${CMAKE_OSX_SYSROOT}\";")
else()
set(id_sdkroot "")
endif()
if(NOT ${XCODE_VERSION} VERSION_LESS 3)
set(v 3)
set(ext xcodeproj)
......
......@@ -84,6 +84,8 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_toolset@
@id_deployment_target@
@id_sdkroot@
};
name = Debug;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment