@@ -4,6 +4,7 @@ import sys
4
4
import os
5
5
import fnmatch
6
6
import glob
7
+ import copy
7
8
sys .path .insert (0 , sys .path [0 ]+ '/waf_tools' )
8
9
9
10
VERSION = '1.0.0'
@@ -115,7 +116,7 @@ def configure(conf):
115
116
elif conf .env .CXX_NAME in ["clang" ]:
116
117
common_flags = "-Wall -std=c++11"
117
118
# no-stack-check required for Catalina
118
- opt_flags = " -O3 -g -faligned-new -fno-stack-check" + native
119
+ opt_flags = " -O3 -g -faligned-new -fno-stack-check" + native
119
120
else :
120
121
gcc_version = int (conf .env ['CC_VERSION' ][0 ]+ conf .env ['CC_VERSION' ][1 ])
121
122
if gcc_version < 47 :
@@ -129,13 +130,20 @@ def configure(conf):
129
130
all_flags = common_flags + conf .env ['py_flags' ] + opt_flags
130
131
conf .env ['CXXFLAGS' ] = conf .env ['CXXFLAGS' ] + all_flags .split (' ' )
131
132
133
+ if conf .env .CXX_NAME in ["icc" , "icpc" ]:
134
+ conf .env ['PUBLIC_CXXFLAGS' ] = native_icc .split (' ' )
135
+ elif conf .env .CXX_NAME in ["clang" ]:
136
+ conf .env ['PUBLIC_CXXFLAGS' ] = ("-faligned-new -fno-stack-check" + native ).split (' ' )
137
+ else :
138
+ conf .env ['PUBLIC_CXXFLAGS' ] = ("-faligned-new" + native ).split (' ' )
139
+
132
140
if len (conf .env .CXXFLAGS_DART ) > 0 :
133
141
if '-std=c++11' in conf .env ['CXXFLAGS' ]:
134
142
conf .env ['CXXFLAGS' ].remove ('-std=c++11' )
135
143
if '-std=c++0x' in conf .env ['CXXFLAGS' ]:
136
144
conf .env ['CXXFLAGS' ].remove ('-std=c++0x' )
137
145
conf .env ['CXXFLAGS' ] = conf .env ['CXXFLAGS' ] + conf .env .CXXFLAGS_DART
138
-
146
+
139
147
# add strict flags for warnings
140
148
corrade .corrade_enable_pedantic_flags (conf )
141
149
print (conf .env ['CXXFLAGS' ])
@@ -246,7 +254,7 @@ def build(bld):
246
254
f .write ('#define ROBOT_DART_VERSION_MAJOR ' + version [0 ] + '\n ' )
247
255
f .write ('#define ROBOT_DART_VERSION_MINOR ' + version [1 ] + '\n ' )
248
256
f .write ('#define ROBOT_DART_VERSION_PATCH ' + version [2 ] + '\n ' )
249
- f .write ('#define ROBOT_DART_ROBOTS_DIR \" ' + prefix + '/share/robot_dart/robots\" \n ' )
257
+ f .write ('#define ROBOT_DART_ROBOTS_DIR \" ' + prefix + '/share/robot_dart/robots\" \n ' )
250
258
bld .install_files ("${PREFIX}/include/robot_dart/" , config_file )
251
259
252
260
#### install the URDF library (robots)
@@ -301,7 +309,7 @@ def build(bld):
301
309
if 'dart-collision-ode' in bld .env .LIB_DART :
302
310
dart_extra_libs += ' collision-ode '
303
311
304
- cxx_flags = '' .join (x + ';' for x in bld .env ['CXXFLAGS ' ])
312
+ cxx_flags = '' .join (x + ';' for x in bld .env ['PUBLIC_CXXFLAGS ' ])
305
313
306
314
lib_type = '.a'
307
315
if bld .env ['lib_type' ] == 'cxxshlib' :
0 commit comments