View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007643CMakeModulespublic2008-09-09 20:252016-06-10 14:30
ReporterPreston A. Elder 
Assigned ToBrad King 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007643: Cmake should add expanded compiler flag support.
DescriptionFrom the email chain:

>> As I said, there are other things that need to be done such as:
>> - Adjusting warning levels (CMAKE_WARN_LEVEL=(None|Full|Standard) )
>> - Forcing a 32-bit or 64-bit compile
>> - Allowing for platform-specific builds if possible (ie. don't maintain
>> i386 compatibility, compile specifically for i686).
>> Most of these can be done in all supported compilers, but the flags for
>> doing so are different per-compiler. Since the Platform directory
>> exists (thanks for pointing it out, I didn't see it before), is there
>> any thoughts on an effort to expand this to more than just optimization
>> and debug flags?

I've been wanting to implement something like this for years, but
haven't had the time to actually do it. The feature would work in terms
of directory, target, and source file properties. It would be similar
to the COMPILE_DEFINITIONS properties: [^] [^] [^] [^]

and their per-configuration equivalents. Such a property might accept
one out of an enumerated list of pre-defined possible values. Each
value would map to the appropriate flag for the native tool.

It might look something like this:

# Apply to all targets in this directory and below.
  OPTIMIZATION_LEVEL_DEBUG none # no optimizations for Debug
  OPTIMIZATION_LEVEL_RELEASE max # max optimizations for Release
  OPTIMIZATION_LEVEL default # compiler default for other configs
  WARNING_LEVEL none # disable all warnings in all configurations
# apply to 'tiny' executable, overriding directory default
set_property(TARGET tiny PROPERTY
  OPTIMIZATION_LEVEL size # optimize for size in all configurations

Of course we could create commands or macros to shorten the syntax for
common cases.

TagsNo tags attached.
Attached Files

related to 0003811closedBrad King Add portable flag to treat warnings as errors 

MrDoomMaster (reporter)
2009-04-03 12:23

I would like to add my vote for this list of functionality. I've been needing to set optimization and warning levels via CMake but it has been far from intuitive or sometimes not even possible.

I would really love to see this in version 2.6.4 if possible! Thanks for hearing the community on this!
Brad King (manager)
2012-08-13 10:36

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2008-09-09 20:25 Preston A. Elder New Issue
2008-09-11 10:20 Bill Hoffman Status new => assigned
2008-09-11 10:20 Bill Hoffman Assigned To => Brad King
2009-04-03 12:23 MrDoomMaster Note Added: 0015901
2012-08-13 10:36 Brad King Status assigned => backlog
2012-08-13 10:36 Brad King Note Added: 0030495
2013-11-02 11:22 Stephen Kelly Relationship added related to 0003811
2016-06-10 14:27 Kitware Robot Note Added: 0041449
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team