Re: How can I differentiate C and C++ compiler?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 8 Oct 2009, Dr. David Kirkby wrote:

I want a user to set environment variables CC and CXX and point them to C and C++ compilers. I want to check that they are in fact C and C++ compilers, and that CC does not point to a C++ compiler, and CXX does not point to a C compiler.

Just test if it defines __cplusplus. Bonus: it works the same for any compiler.

--
Marc Glisse

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux