[Cmake] Determining host compiler/OS from CMake
Bill Hoffman
bill.hoffman at kitware.com
Thu Feb 28 11:53:34 EST 2002
Short answer: No, currently there is not.
Longer answer:
The ADD_DEFINITIONS command is a bit of a loop hole that I am thinking about plugging.
I am currently adding support for ms .NET and it does not take
command line options like -D, but rather has XML an encoding of the
various command line options for the compiler. So,
I am thinking of deprecating the ADD_DEFINITIONS command, for
ADD_COMPILER_DEFINITION(DEFINE [VALUE])
Perhaps I could also add a
ADD_COMPILER_FLAG() but it would be very non-portable as some compilers
do not even take flags.
Also, currently in cmake there is no way to do per-file flags, only per
directory. So, if you want to set a flag, you can do it for the whole
system when you run cmake. If you want a per-file flag, it can not do
it anyway.
-Bill
At 11:33 AM 2/28/2002 -0500, Parag Chandra wrote:
>Hi there,
>
>Is there a predefined Cmake variable that I can use to determine the compiler and/or the operating system that Cmake is running under? I d like Cmake to be able to set some flags via the ADD_DEFINITIONS command using this information.
>
>
>
>Thanks
>
>
>
>Parag Chandra
>
>Mi-Co
>
>919-485-4819 ext. 1616
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20020228/eb62bae6/attachment.html>
More information about the CMake
mailing list