[cfe-dev] CMake/Xcode build fails trying to build asan

Brad King brad.king at kitware.com
Wed Feb 19 08:04:53 PST 2014


On 02/18/2014 08:40 PM, Kyle Sluder wrote:
> I think the solution requires not putting the -isysroot and
> -mmacosx-version-min flags in OTHER_CFLAGS when using the Xcode
> generator. Instead, the ios targets should set the $(SDKROOT) and
> $(MACOSX_DEPLOYMENT_TARGET) build settings in the generated pbxproj.

CMake has builtin features to generate these flags in the appropriate
place for each generator.  See CMAKE_OSX_SYSROOT and
CMAKE_OSX_DEPLOYMENT_TARGET:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/variable/CMAKE_OSX_SYSROOT.rst;hb=28dcccfa
 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/variable/CMAKE_OSX_DEPLOYMENT_TARGET.rst;hb=28dcccfa

Note the disclaimer about when they should be set:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/variable/CMAKE_OSX_VARIABLE.txt;hb=28dcccfa

-Brad




More information about the cfe-dev mailing list