From 1b515fd0ff078166441f320734e4c0cbe725c9a0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 25 May 2014 00:21:20 +0200 Subject: [PATCH] really fix osx mavericks detection --- wscript | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/wscript b/wscript index 3fb33e13c6..12997e7f82 100644 --- a/wscript +++ b/wscript @@ -148,15 +148,6 @@ 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 or conf.env['build_target'] == 'mavericks': - conf.check_cxx(cxxflags=["-std=c++11"]) - cxx_flags.append('-std=c++11') - if platform == "darwin": - cxx_flags.append('-stdlib=libc++') - linker_flags.append('-lc++') - # Prevents visibility issues in standard headers - conf.define("_DARWIN_C_SOURCE", 1) - if conf.options.asan: conf.check_cxx(cxxflags=["-fsanitize=address", "-fno-omit-frame-pointer"], linkflags=["-fsanitize=address"]) cxx_flags.append('-fsanitize=address') @@ -186,8 +177,10 @@ def set_compiler_flags (conf,opt): conf.env['build_target'] = 'snowleopard' elif re.search ("^11[.]", version) != None: conf.env['build_target'] = 'lion' - else: + elif re.search ("^12[.]", version) != None: conf.env['build_target'] = 'mountainlion' + else: + conf.env['build_target'] = 'mavericks' # 13.0.0 else: match = re.search( "(?Pi[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)", @@ -208,6 +201,15 @@ def set_compiler_flags (conf,opt): # compiler_flags.append ('-U__STRICT_ANSI__') + if conf.options.cxx11 or conf.env['build_target'] == 'mavericks': + conf.check_cxx(cxxflags=["-std=c++11"]) + cxx_flags.append('-std=c++11') + if platform == "darwin": + cxx_flags.append('-stdlib=libc++') + linker_flags.append('-lc++') + # Prevents visibility issues in standard headers + conf.define("_DARWIN_C_SOURCE", 1) + if ((re.search ("i[0-9]86", cpu) != None) or (re.search ("x86_64", cpu) != None)) and conf.env['build_target'] != 'none':