Changeset 33ab2c6 in autowaf


Ignore:
Timestamp:
Sep 23, 2017, 1:37:56 AM (8 weeks ago)
Author:
David Robillard <d@…>
Branches:
master
Children:
c5b2c22
Parents:
cc35f7c
Message:

Add set_cxx11_mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • autowaf.py

    rcc35f7c r33ab2c6  
    293293    else:
    294294        conf.env.append_unique('CFLAGS', ['-std=c99'])
     295
     296def set_cxx11_mode(conf, mandatory=False):
     297    if conf.check_cxx(cxxflags=['-std=c++11'], mandatory=False):
     298        conf.env.append_unique('CXXFLAGS', ['-std=c++11'])
     299    elif conf.check_cxx(cxxflags=['-std=c++0x'], mandatory=False):
     300        conf.env.append_unique('CXXFLAGS', ['-std=c++0x'])
     301    elif mandatory:
     302        Logs.error('No C++11 compiler flags supported')
    295303
    296304def set_local_lib(conf, name, has_objects):
Note: See TracChangeset for help on using the changeset viewer.