[CMake] No CMAKE_CXX_COMPILER could be found

Parag Chandra parag at ionicsecurity.com
Fri Apr 17 09:56:32 EDT 2015


Hi Jon,

I can't really explain why, but I've seen the same problem on a colleague's Mac as well. On my machine, it works just fine, but to get it working across all of our Macs, I find I need to explicitly define the compilers by passing these arguments to CMake on the command line:

-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

Hope this works for you too.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Jon Hodgson <jonhodgson.devlists at googlemail.com<mailto:jonhodgson.devlists at googlemail.com>>
Date: Friday, April 17, 2015 at 8:44 AM
To: "cmake at cmake.org<mailto:cmake at cmake.org>" <cmake at cmake.org<mailto:cmake at cmake.org>>
Subject: [CMake] No CMAKE_CXX_COMPILER could be found

HI,

Running OSX Snow Leopard, XCode 5.1.1

Command line tools installed.

If I type
clang --version
at the command line I get version 5.1


CMake 3.2.2

The first lines of outpuit I get are

The CXX compiler identification is AppleClang 5.1.0.5030040
The C compiler identification is AppleClang 5.1.0.5030040

But then it bombs out at the line

PROJECT(${PROJECT_NAME} CXX C)

with the error

No CMAKE_CXX_COMPILER could be found

CMake 2.8.11 doesn't bomb out at that point (but does later due to the fact hat this CMakelist.txt file uses functionality that has changed).

Anybody got any idea what is going on?

cheers

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150417/32156e3f/attachment-0001.html>


More information about the CMake mailing list