[cmake-developers] [CMake 0014759]: add_definitions and -std=c++11

Mantis Bug Tracker mantis at public.kitware.com
Mon Feb 17 07:55:31 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=14759 
====================================================================== 
Reported By:                Mathieu Malaterre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14759
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-02-17 07:55 EST
Last Modified:              2014-02-17 07:55 EST
====================================================================== 
Summary:                    add_definitions and -std=c++11
Description: 
I recently discovered a new behavior for add_definitions as explained at:

http://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake#16393486

For some reason, cmake seems to cope with something like this:

ADD_DEFINITIONS(
    -std=c++11 # Or -std=c++0x
    # Other flags
)

I doubt this is pure luck, so I would suggest that it either be documented as:
1. Undefined behavior
2. Properly defined behavior, in which case `cmake --help-command
add_definitions` should be updated.

thanks
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-02-17 07:55 Mathieu MalaterreNew Issue                                    
======================================================================



More information about the cmake-developers mailing list