forked from crossbario/autobahn-cpp
-
Notifications
You must be signed in to change notification settings - Fork 5
/
SConstruct
53 lines (42 loc) · 1.91 KB
/
SConstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
###############################################################################
##
## Copyright (C) 2014 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http:##www.apache.org#licenses#LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
###############################################################################
import os
env = Environment(ENV = os.environ)
USE_SHIT_COMPILER = False
if USE_SHIT_COMPILER:
env["CC"] = "gcc"
env["CXX"] = "g++"
env.Append(CXXFLAGS = ['-std=c++11', '-Wall', '-Wno-deprecated-declarations', '-Wl,--no-as-needed', '-pthread'])
else:
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libc++', '-Wall', '-Wno-deprecated-declarations', '-pthread'])
# env.Append(CXXFLAGS = ['-stdlib=libc++', '-Wall', '-Wno-deprecated-declarations', '-pthread'])
env.Append(LINKFLAGS = ['-stdlib=libc++', '-pthread'])
env["CC"] = "clang"
env["CXX"] = "clang++"
# -std=c++11 -stdlib=libc++
#
env.Append(CPPPATH = ['/home/oberstet/boost_1_55_0/'])
env.Append(LIBPATH = ['/home/oberstet/boost_1_55_0/stage/lib'])
env.Append(CPPPATH = ['#/include'])
env.Append(CPPPATH = [os.path.join(os.environ['HOME'], 'msgpack_clang/include')])
env.Append(LIBPATH = [os.path.join(os.environ['HOME'], 'msgpack_clang/lib')])
#env.Append(LIBPATH = ['/usr/lib/x86_64-linux-gnu/'])
Export('env')
autobahn = SConscript('src/SConscript', variant_dir = 'build/src', duplicate = 0)
Export('autobahn')
tests = SConscript('test/SConscript', variant_dir = 'build/test', duplicate = 0)