On 04/26/2014 08:55 AM, Stephen Kelly wrote: > 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.
Ugh. That Xcode selects a different compiler when the project file sets SDKROOT than when it does not. The compiler id step runs very early so Darwin.cmake has not been loaded to set CMAKE_OSX_SYSROOT. When that is later used then the actual generated project files get SDKROOT and Xcode changes the compiler. For the compiler id step Xcode chooses "com.apple.compilers.llvmgcc42" but the build uses "com.apple.compilers.llvm.clang.1_0.compiler". It looks like in this case users will have to tell Xcode what tool to use up front using the CMake generator toolset feature (cmake -T). I think this is acceptable because it only affects old Xcode versions. Otherwise we will need a much more complicated compiler id bootstrap process :( I've updated the dashboard script on the build in question to specify the clang compiler explicitly. Please drop the non-APPLE condition for the test to see if it works now. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers