From f158f759b1eea0957ec8c58e5a9f0a7d40c15d50 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Tue, 11 Apr 2017 09:57:51 -0700 Subject: [PATCH] more portable wscript --- wscript | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wscript b/wscript index 63dfb406..d00e01fa 100644 --- a/wscript +++ b/wscript @@ -86,6 +86,14 @@ def build(bld): cc_files = bld.path.ant_glob(['**/*.cpp', '**/*.cc'], excl=['libcxx/*', '*tests/*', 'third_party/*']) + + lib = ['clang'] + if sys.platform == 'linux' or sys.platform == 'linux2': + lib.append('rt') + lib.append('pthread') + elif sys.platform == 'darwin': + lib.append('pthread') + bld.program( source=cc_files, cxxflags=['-O3', '-std=c++11', '-Wall'], @@ -95,10 +103,7 @@ def build(bld): 'third_party/rapidjson/include', 'third_party/sparsehash/src', CLANG_INCLUDE_DIR], - lib=[ - 'clang', - 'rt', - 'pthread'], + lib=lib, libpath=[CLANG_LIB_DIR], rpath=[CLANG_LIB_DIR], target='app')