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

Sean McBride sean at rogue-research.com
Thu Jul 12 16:55:36 EDT 2012


Hi all,

Nowadays, Xcode is distributed as a standalone .app instead of an installer that copies files all over the place.  As a consequence of this, nothing gets installed at /usr/bin/make, /usr/bin/cc, etc.

Optionally, one can install a separate 'command line tools' package that places things at those venerable locations.  Without installing that, one can still find and use 'make' and other tools using 'xcrun' (see 'man xcrun').  ex:

$ xcrun make --version
GNU Make 3.81

$ xcrun -find make
/Applications/Xcode.app/Contents/Developer/usr/bin/make

Without the 'command line tools' installed, CMake seems unable to get far:

Error(s) when configuring the project
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

It would be nice if CMake would invoke 'xcrun -find' to find the paths to the tools it needs.  Or can it already, and I'm missing something?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the CMake mailing list