[CMake] Xcode without 'command line tools' & xcrun & CMake

Bill Hoffman bill.hoffman at kitware.com
Tue Jul 17 14:22:20 EDT 2012


On 7/17/2012 1:38 PM, Sean McBride wrote:
> On Fri, 13 Jul 2012 11:03:02 -0400, Bill Hoffman said:
>
>> I am guessing some of the tools will not run without proper environments
>> set.  So, running the command line compilers will not work by doing lots
>> of calls to xcrun -find....  Think, ld, ar, gcc, g++, cfront, and all
>> the other stuff you need to run a compiler and cmake on the mac.   I
>> think we will have to take the stance that we do on windows, you have to
>> run cmake from a shell that is setup to run the compiler.
>
> Perhaps, I'm not enough of a shell nor cmake expert to say...
>
>> Is there an xcvars?
>
> Not that I know of.  That would be analogous to...?  What would it do?

In VS it setups the environment to run CC from the command line.

>
> For now, I've created this bug:
>
> CMake should support default installation of Xcode.app only, without 'command line tools' extras
> <http://public.kitware.com/Bug/view.php?id=13408>
>
I am not sure I agree with the statement.  CMake has always required 
that the command line tools that it uses be in the environment.  I 
really don't see how CMake could technically use xcrun to configure an 
environment correctly so that things would work.  On all platforms CMake 
requires the environment to work from the command line.

> Relatedly, on my new-from-the-store Mac Mini, I'm getting two test failures:
> <http://open.cdash.org/viewTest.php?onlyfailed&buildid=2445802>
>
> both because the tests can't find PackageMaker. Indeed, PackageMaker
is no longer part of the default Xcode.app, nor is it installed as part
of the 'command line tools' but rather part of the separate 'auxiliary
tools' (there are about 7 stupid installers for all these separate
things now).
>
> Perhaps these tests should only be run conditional on the presence
> of
PackageMaker instead of allowed to fail hard?
>

This we might be able to fix.

-Bill


More information about the CMake mailing list