Fixes building on Mac, issue #421
This commit is contained in:
parent
6228c2c89b
commit
09088e71b5
17
SConstruct
17
SConstruct
@ -75,9 +75,10 @@ else:
|
||||
if GetOption('allflags') is not None:
|
||||
env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls"])
|
||||
|
||||
if "clang" in env["CXX"] :
|
||||
print "Warning building with clang removes OpenMP parallelization"
|
||||
env.Append(CXXFLAGS = ["-W#warnings", "-Wc++0x-compat", "-Waddress-of-temporary", "-Wambiguous-member-template", "-Warray-bounds", "-Watomic-properties", "-Wbind-to-temporary-copy", "-Wbuiltin-macro-redefined", "-Wc++-compat", "-Wc++0x-extensions", "-Wcomments", "-Wconditional-uninitialized", "-Wconstant-logical-operand", "-Wdeclaration-after-statement", "-Wdeprecated", "-Wdeprecated-implementations", "-Wdeprecated-writable-strings", "-Wduplicate-method-arg", "-Wempty-body", "-Wendif-labels", "-Wenum-compare", "-Wformat=2", "-Wfour-char-constants", "-Wgnu", "-Wincomplete-implementation", "-Winvalid-noreturn", "-Winvalid-offsetof", "-Winvalid-token-paste", "-Wlocal-type-template-args", "-Wmethod-signatures", "-Wmicrosoft", "-Wmissing-declarations", "-Wnon-pod-varargs", "-Wnonfragile-abi2", "-Wnull-dereference", "-Wout-of-line-declaration", "-Woverlength-strings", "-Wpacked", "-Wpointer-arith", "-Wpointer-sign", "-Wprotocol", "-Wreadonly-setter-attrs", "-Wselector", "-Wshift-overflow", "-Wshift-sign-overflow", "-Wstrict-selector-match", "-Wsuper-class-method-mismatch", "-Wtautological-compare", "-Wtypedef-redefinition", "-Wundeclared-selector", "-Wunnamed-type-template-args", "-Wunused-exception-parameter", "-Wunused-member-function", "-Wused-but-marked-unused", "-Wvariadic-macros"])
|
||||
if "clang" in env["CXX"]:
|
||||
print "Warning building with clang removes OpenMP parallelization"
|
||||
if GetOption('allflags') is not None:
|
||||
env.Append(CXXFLAGS = ["-W#warnings", "-Wc++0x-compat", "-Waddress-of-temporary", "-Wambiguous-member-template", "-Warray-bounds", "-Watomic-properties", "-Wbind-to-temporary-copy", "-Wbuiltin-macro-redefined", "-Wc++-compat", "-Wc++0x-extensions", "-Wcomments", "-Wconditional-uninitialized", "-Wconstant-logical-operand", "-Wdeclaration-after-statement", "-Wdeprecated", "-Wdeprecated-implementations", "-Wdeprecated-writable-strings", "-Wduplicate-method-arg", "-Wempty-body", "-Wendif-labels", "-Wenum-compare", "-Wformat=2", "-Wfour-char-constants", "-Wgnu", "-Wincomplete-implementation", "-Winvalid-noreturn", "-Winvalid-offsetof", "-Winvalid-token-paste", "-Wlocal-type-template-args", "-Wmethod-signatures", "-Wmicrosoft", "-Wmissing-declarations", "-Wnon-pod-varargs", "-Wnonfragile-abi2", "-Wnull-dereference", "-Wout-of-line-declaration", "-Woverlength-strings", "-Wpacked", "-Wpointer-arith", "-Wpointer-sign", "-Wprotocol", "-Wreadonly-setter-attrs", "-Wselector", "-Wshift-overflow", "-Wshift-sign-overflow", "-Wstrict-selector-match", "-Wsuper-class-method-mismatch", "-Wtautological-compare", "-Wtypedef-redefinition", "-Wundeclared-selector", "-Wunnamed-type-template-args", "-Wunused-exception-parameter", "-Wunused-member-function", "-Wused-but-marked-unused", "-Wvariadic-macros"])
|
||||
else:
|
||||
env.Append(CCFLAGS = ['-minline-all-stringops', '-fopenmp'])
|
||||
env.Append(LINKFLAGS = '-fopenmp')
|
||||
@ -101,7 +102,7 @@ if sys.platform == 'darwin': #Mac OS X
|
||||
boost_prefix = subprocess.check_output(["brew", "--prefix", "boost"]).strip()
|
||||
env.Append(CPPPATH = [boost_prefix+"/include"] )
|
||||
env.Append(LIBPATH = [boost_prefix+"/lib"] )
|
||||
|
||||
env.ParseConfig('pkg-config --cflags --libs libzip')
|
||||
if not conf.CheckLibWithHeader('lua', 'lua.h', 'C'):
|
||||
print "lua library not found. Exiting"
|
||||
Exit(-1)
|
||||
@ -110,6 +111,7 @@ if sys.platform == 'darwin': #Mac OS X
|
||||
print "luabind library not found. Exiting"
|
||||
Exit(-1)
|
||||
|
||||
|
||||
elif sys.platform.startswith("freebsd"):
|
||||
env.ParseConfig('pkg-config --cflags --libs protobuf')
|
||||
env.Append(CPPPATH = ['/usr/local/include', '/usr/local/include/libxml2'])
|
||||
@ -132,6 +134,10 @@ else:
|
||||
if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'CXX'):
|
||||
print "pthread not found. Exiting"
|
||||
Exit(-1)
|
||||
if not conf.CheckLibWithHeader('zip', 'zip.h', 'CXX'):
|
||||
print "zip library not found. Exiting"
|
||||
Exit(-1)
|
||||
|
||||
env.ParseConfig('pkg-config --cflags --libs lua5.1-c++')
|
||||
env.ParseConfig('pkg-config --cflags --libs luabind')
|
||||
|
||||
@ -149,9 +155,6 @@ if not conf.CheckLibWithHeader('osmpbf', 'osmpbf/osmpbf.h', 'CXX'):
|
||||
print "osmpbf library not found. Exiting"
|
||||
print "Either install libosmpbf-dev (Ubuntu) or use https://github.com/scrosby/OSM-binary"
|
||||
Exit(-1)
|
||||
if not conf.CheckLibWithHeader('zip', 'zip.h', 'CXX'):
|
||||
print "Zip library not found. Exiting"
|
||||
Exit(-1)
|
||||
if not conf.CheckLibWithHeader('protobuf', 'google/protobuf/descriptor.h', 'CXX'):
|
||||
print "Google Protobuffer library not found. Exiting"
|
||||
Exit(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user