<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">We use this<div><br></div><div><div>if(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_CXX_COMPILER MATCHES "clang")</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>set(COMPILING_WITH_CLANG True)</div><div>elseif(CMAKE_C_COMPILER MATCHES ".*gcc.*" OR CMAKE_CXX_COMPILER MATCHES ".*g[+][+].*")</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>set(COMPILING_WITH_GCC True)</div><div>endif()</div><div><br></div><div>In our project</div><div><br></div><div><div><div>On 2013-30-01, at 14:42:05 , Thomas Nilsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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++").<br><div><br></div><div>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++.</div><div><br></div><div>Given my belief that CMAKE_CXX_COMPILER_ID will not be implemented soon, what are my options?</div><div><div><br></div><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><i>Thomas</i></div></div></span></div>
</div>
<br></div></div>--<br><br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div></div></body></html>