[CMake] Enabling C99 in CMake

Todd Gamblin tgamblin at llnl.gov
Wed Jun 22 16:49:34 EDT 2011


Done.

http://www.cmake.org/Bug/view.php?id=12300


On Jun 22, 2011, at 1:08 PM, Sean McBride wrote:

> On Wed, 22 Jun 2011 12:32:55 -0700, Todd Gamblin said:
> 
>> Is there a good cross-platform way to enable C99 in a CMake project
>> right now?  You can obviously do this:
>> 
>> 	set(CMAKE_C_FLAGS "-std=c99")
>> 
>> However, that's the GNU way to enable C99, and other compilers do it
>> differently.  It would be nice if there were some flags for this set for
>> you in whatever platform file you're using, e.g.:
>> 
>> 	set(CMAKE_C_FLAGS "${CMAKE_ENABLE_C99}")
>> 
>> Or something to that effect.  Then you'd pick up -qlanglvl=c99 for xlc, -
>> std=c99 for gcc, etc.
>> 
>> Is there anything similar already in there?  I don't see anything
>> grepping around in the modules or platform files.
> 
> I don't think there is.  But it would be a good idea, and I suggest you file a bug.  The VTK dashboard has warnings for exactly this reason:
> 
> <http://www.vtk.org/Bug/view.php?id=11952>
> 
> -- 
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com 
> Mac Software Developer              Montréal, Québec, Canada
> 
> 

______________________________________________________________________
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