Running on OSX 10.8, XCode developer tools 5.1.1.
In pointing CLion at our legacy CMakeList.txt file (which references several others), I'm getting a failure upon opening the project, due to the fact that cmake, via CLion, is seeing the wrong compilers (cc instead of clang). In our build system, we actually invoke cmake via a rake script that sets the CC and CXX environment variables prior to running cmake. Doing this from the shell does the right thing:
env CXX=/usr/bin/clang++ CC=/usr/bin/clang cmake -DCMAKE_BUILD_TYPE=Debug
But I can't figure out how to get CLion to use those values (instead of the default /usr/bin/cc usr/bin/c++). I tried the following, and none worked:
- putting the env directive into the Prefs->Build, Excecution & Deployment->Toolchains->CMake executable
- creating a shell script with the env variables set that invokes cmake and pointing the same preference
- setting Environment variables->CC/CXX in CLion EAP.app/Contents/Info.plist.