[CMake] CMAKE_<lang>_COMPILER_ID not set on Darwin
Nick Overdijk
nick at astrant.net
Wed Jan 30 08:45:27 EST 2013
We use this
if(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_CXX_COMPILER MATCHES "clang")
set(COMPILING_WITH_CLANG True)
elseif(CMAKE_C_COMPILER MATCHES ".*gcc.*" OR CMAKE_CXX_COMPILER MATCHES ".*g[+][+].*")
set(COMPILING_WITH_GCC True)
endif()
In our project
On 2013-30-01, at 14:42:05 , Thomas Nilsson wrote:
> 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
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130130/7048a2e7/attachment-0001.htm>
More information about the CMake
mailing list