I'm trying to build LLVM via Xcode. In order to do that, I have to fix some explicit uses of "-isysroot", since it results in Xcode targets that try to build for the simulator with two -isysroot flags pointing at two different SDKs. Instead I'm trying to set XCODE_ATTRIBUTE_SDKROOT to the appropriate value so that Xcode's project settings result in the appropriate '-isysroot' flag.
But I'm being stymied by CMake, which is insisting on setting CMAKE_OSX_SYSROOT to my current platform's SDK despite the fact that I'm using the Xcode generator. Looking at Darwin.cmake at HEAD, this seems to be intentional: 114 elseif("${CMAKE_GENERATOR}" MATCHES Xcode 115 OR CMAKE_OSX_DEPLOYMENT_TARGET 116 OR CMAKE_OSX_ARCHITECTURES MATCHES "[^;]" 117 OR NOT EXISTS "/usr/include/sys/types.h") 118 # Find installed SDKs in either Xcode-4.3+ or pre-4.3 SDKs directory. 119 set(_CMAKE_OSX_SDKS_DIR "") 120 if(OSX_DEVELOPER_ROOT) 121 foreach(d Platforms/MacOSX.platform/Developer/SDKs SDKs) [. . .] I don't see why this would be considered a good idea when using the Xcode generator. It's just going to result in redundant '-isysroot' flags, isn't it? --Kyle Sluder -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake