[CMake] Does CMake 3.3.1 ignore CXX env variable on OSX10.10?
Nils Gladitz
nilsgladitz at gmail.com
Tue Sep 22 11:08:14 EDT 2015
On 09/22/2015 04:43 PM, Pere Mato Vila wrote:
> Hi Ben,
>
> Thanks, but in my case CXX is already a full path (/usr/bin/clang++). It is set like this
>
> export CXX=`which clang++`
>
> I do not understand how /usr/bin/clang++ gets converted to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
>> https://github.com/Kitware/CMake/commit/1f085e11e40a20f8e8702da7920e950e47deb27c
As the commit seems to explain the /usr/bin/clang++ binary is not the
actual clang++ binary but rather an apple provided tool that delegates
to the actual compiler depending on the current environment.
CMake runs "xcrun --find clang++" to find out which binary is currently
the actual compiler.
This is done since CMake does not allow compilers to change once they
have been configured given that this would invalidate information
previously collected.
Nils
More information about the CMake
mailing list