[CMake] Enabling C99 in CMake

Todd Gamblin tgamblin at llnl.gov
Tue Jun 28 01:29:04 EDT 2011


On Jun 27, 2011, at 10:26 PM, Hendrik Sattler wrote:

> Am Montag, 27. Juni 2011, 18:40:19 schrieb Todd Gamblin:
>> 
>> 
>> I *think* Michael's concern here is that if you have a project that uses
>> C99, it should fail as fast as possible, e.g. when it knows that the
>> detected/provided compiler does not support C99 as it processes the
>> 'project' command at the beginning of the CMakeLists.txt file.
> 
> Please keep in mind that porjects might use _some_ but not all aspects of C99 
> because they want to support a compiler like MSVC which is not fully C99 
> compatible. What do you want to do with those?
> 
> Also the project might have adding header files (e.g. unofficial versions of 
> inttypes.h and stdint.h for MSVC) to allow usage of C99 although the plain 
> compiler does not support that.

I think, that if the compiler only offers some support for C99, then that should be the default when you request C99, as that is the best you can do... Wouldn't that take care of this situation?

-Todd



______________________________________________________________________
Todd Gamblin, tgamblin at llnl.gov, http://people.llnl.gov/gamblin2
CASC @ Lawrence Livermore National Laboratory, Livermore, CA, USA



More information about the CMake mailing list