[cmake-developers] CMake identifies MacOSX10.7-Xcode43-ub as GNU, but it runs clang.

Stephen Kelly steveire at gmail.com
Sat Apr 26 08:55:40 EDT 2014


Stephen Kelly wrote:
> Could this be because it is old clang which did not define __clang__?
> 
> Apart from the misidentification, I don't understand how the
> WriteCompilerDetectionHeader test could have a different result than the
> compiler identification code. It should be checking the same defines in
> the same order, and it should arrive at the same incorrect conclusion that
> the compiler is GNU.

That machine seems to partly be using llvm-gcc. At least that is what is 
used for the identification step, which is why it identifies as GNU. 

After the identification step (when building), clang is used, which is why 
my test fails.

I conditionalized the test execution to exclude APPLE, which is fine for 
now. It's the same condition in GNU-CXX.cmake, and I introduced it exactly 
for this reason of excluding platforms from these features from platforms 
that cause problems until the features themselves are in.

Thanks,

Steve.





More information about the cmake-developers mailing list