[CMake] CMake and OS X compiler tools without SDK

David Gobbi david.gobbi at gmail.com
Fri Sep 21 12:36:29 EDT 2012


On Fri, Sep 21, 2012 at 9:34 AM, Brad King <brad.king at kitware.com> wrote:
>
> I just made a few more commits to address this before 2.8.10.
> The main changes are:
>
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0a0877a
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=230ea218
>
> Now CMake will always verify that the SDKs directory exists
> before using it.  If not it will fall back to an empty value
> for CMAKE_OSX_SYSROOT.  This allows me to build with just the
> command line tools for Xcode 4.5 but not the IDE.
>
> Furthermore when CMAKE_OSX_SYSROOT is not empty then CMake
> will always use the -isysroot flag if the compiler supports it.
> I can now build with Xcode 4.4 without the command-line tools,
> even using the Makefile generator, by setting my env with just:
>
>  export PATH="$(dirname $(xcrun --find make)):$PATH"
>  export CC="$(xcrun --find cc)"
>  export CXX="$(xcrun --find c++)"

Thanks, I just did a build of VTK under XCode 4.5 with cmake-next and
it no longer sets the CMAKE_OSX_SYSROOT to a non-existent
/Developer/SDKs/MacOSX10.7.sdk.  And with my old XCode 3.2 system,
it _does_ find and use the existing MacOSX10.6.sdk.  It also builds fine
under XCode 3.2 if I clear CMAKE_OSX_SYSROOT (in the former case,
-isysroot appears on the command line, in the latter case it does not).

 - David


More information about the CMake mailing list