[CMake] 2.8.11: CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX Value Changed

Giordano Khouri kgiordano at nikon.net
Wed Oct 16 12:56:27 EDT 2013


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

kgiordano at nikon.net<mailto:kgiordano at nikon.net>




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: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of vv zhao
Sent: Wednesday, October 16, 2013 2:46 AM
To: cmake at cmake.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131016/5e14a977/attachment-0001.htm>


More information about the CMake mailing list