[CMake] CMAKE_<lang>_COMPILER_ID not set on Darwin

Thomas Nilsson thomas.nilsson at responsive.se
Wed Jan 30 08:42:05 EST 2013


I was looking for a way to identify the compiler as clang to know if I should pass it a clang specific flag ("-x c++").

On Darwin default compiler is Clang used through /usr/bin/cc and and /usr/bin/c++. The identification is clearly signaled as "Clang 4.1.0" but CMAKE_CXX_COMPILER_ID is not set. Obviously CMAKE_CXX_COMPILER is set to /usr/bin/c++.

Given my belief that CMAKE_CXX_COMPILER_ID will not be implemented soon, what are my options?

Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130130/8e36fe83/attachment.htm>


More information about the CMake mailing list