Merge branch 'master' into windows
This commit is contained in:
20
wscript
20
wscript
@@ -8,7 +8,7 @@ import subprocess
|
||||
import sys
|
||||
|
||||
MAJOR = '3'
|
||||
MINOR = '2'
|
||||
MINOR = '3'
|
||||
VERSION = MAJOR + '.' + MINOR
|
||||
|
||||
APPNAME = 'Ardour' + MAJOR
|
||||
@@ -109,6 +109,22 @@ def set_compiler_flags (conf,opt):
|
||||
|
||||
# waf adds -O0 -g itself. thanks waf!
|
||||
is_clang = conf.env['CXX'][0].endswith('clang++')
|
||||
|
||||
if conf.options.cxx11:
|
||||
conf.check_cxx(cxxflags=["-std=c++11"])
|
||||
conf.env.append_unique('CXXFLAGS', ['-std=c++11'])
|
||||
if platform == "darwin":
|
||||
conf.env.append_unique('CXXFLAGS', ['-stdlib=libc++'])
|
||||
conf.env.append_unique('LINKFLAGS', ['-lc++'])
|
||||
# Prevents visibility issues in standard headers
|
||||
conf.define("_DARWIN_C_SOURCE", 1)
|
||||
|
||||
if is_clang and platform == "darwin":
|
||||
# Silence warnings about the non-existing osx clang compiler flags
|
||||
# -compatibility_version and -current_version. These are Waf
|
||||
# generated and not needed with clang
|
||||
conf.env.append_unique ("CXXFLAGS", ["-Qunused-arguments"])
|
||||
|
||||
if opt.gprofile:
|
||||
debug_flags = [ '-pg' ]
|
||||
|
||||
@@ -453,6 +469,8 @@ def options(opt):
|
||||
help='directory where Wine\'s Windows header files can be found')
|
||||
opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm',
|
||||
help='Do not ask questions that require confirmation during the build')
|
||||
opt.add_option('--cxx11', action='store_true', default=False, dest='cxx11',
|
||||
help='Turn on c++11 compiler flags (-std=c++11)')
|
||||
for i in children:
|
||||
opt.recurse(i)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user