Looking at the source code, a check is first made for __clang__ and sets CMAKE_<LANG>_COMPILER_ID to "Clang". If you are using CMake 2.8.12, you can even get "AppleClang" to further differentiate it. Since you are using clang, this is correct. This is the variable you should be looking at. Since so many flavors of compilers are based on or compatible with gcc, the test for __GNUC__ comes after testing for all of the others. CMAKE_COMPILER_IS_GNUCC is only set for this last case.
[http://download2.nikon.net/images/logo/bsymbol.gif] Khouri Giordano Software Technology Researcher Nikon Inc. 1300 Walt Whitman Road Melville NY 11747-3064 Office: 631-547-4335 Fax: 631-547-0361 [email protected]<mailto:[email protected]> www.nikonusa.com [http://download2.nikon.net/images/logo/nikon1AW1sig.jpg] <http://www.nikonusa.com/en/Nikon-Products/Product/Nikon1/V27669.27669/Nikon-1-AW1.html?cid=eml-0913-n1aw1-signature> From: [email protected] [mailto:[email protected]] On Behalf Of vv zhao Sent: Wednesday, October 16, 2013 2:46 AM To: [email protected] Subject: [CMake] 2.8.11: CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX Value Changed Hi Guys, I'm v.v., a developer using cmake to generate our project, Recently we updated our cmake from 2.8.8 to 2.8.11 on Mac, immediately I found a difference between the latest and previous version, I see CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX is changed from true to false, but I didn't change my compiler at all, I am using XCode4.5 and select com.apple.compilers.llvm.clang.1_0 as CMAKE_XCODE_ATTRIBUTE_GCC_VERSION in toolchain file, So my question here is: Is this a correct behaviour for latest 2.8.11 that CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX is false? BTW, I read all of documents from 2.8.8 to 2.8.11 about this variable, but seems no explicit description about this change, Do you have any ideas? Thanks in advance! V.V. CONFIDENTIAL: This e-mail including any attachments is intended only for the party or parties to whom it is addressed and may contain information which is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, copying, or printing of any information contained in or attached to this e-mail is STRICTLY PROHIBITED and may constitute a breach of confidentiality and/or privilege. If you have received this e-mail in error, please notify immediately the sender by reply e-mail and then delete this e-mail and any attachments in their entirety from your system. Thank you. This e-mail message including any attachments is believed to be free of any viruses; however, it is the sole responsibility of the recipient to ensure that it is virus free, and Nikon does not accept any responsibility for any loss, disruption or damage to your data or computer system which may occur in connection with this e-mail including any attachments.
-- 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://www.cmake.org/mailman/listinfo/cmake
