Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor improvements to wscript (-fPIC) and dart.py + add line number in assert #179

Merged
merged 4 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/robot_dart/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace robot_dart {
#define ROBOT_DART_ASSERT(condition, message, returnValue) \
do { \
if (!(condition)) { \
std::cerr << "robot_dart assertion failed: " << message << std::endl; \
std::cerr << __LINE__ << " " << __FILE__<< " -> robot_dart assertion failed: " << message << std::endl; \
return returnValue; \
} \
} while (false)
Expand Down
2 changes: 1 addition & 1 deletion waf_tools/dart.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_directory(filename, dirs):
libs_check = [conf.options.dart + '/lib']
else:
includes_check = ['/usr/local/include', '/usr/include', '/opt/homebrew/include']
libs_check = ['/usr/local/lib', '/usr/local/lib64', '/usr/lib', '/usr/lib64', '/usr/lib/x86_64-linux-gnu/', '/opt/homebrew/lib']
libs_check = ['/usr/local/lib', '/usr/local/lib64', '/usr/lib', '/usr/lib64', '/usr/lib/x86_64-linux-gnu/', '/usr/local/lib/x86_64-linux-gnu/', '/opt/homebrew/lib']

if 'RESIBOTS_DIR' in os.environ:
includes_check = [os.environ['RESIBOTS_DIR'] + '/include'] + includes_check
Expand Down
6 changes: 3 additions & 3 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ def configure_robot_dart(conf):
common_flags = "-Wall -std=c++11"
opt_flags = " -O3 -xHost -unroll -g " + native_icc
elif conf.env.CXX_NAME in ["clang"]:
common_flags = "-Wall -std=c++11"
common_flags = "-Wall -std=c++11 -fPIC"
# no-stack-check required for Catalina
opt_flags = " -O3 -g -faligned-new -fno-stack-check -Wno-narrowing" + native
else:
gcc_version = int(conf.env['CC_VERSION'][0]+conf.env['CC_VERSION'][1])
if gcc_version < 47:
common_flags = "-Wall -std=c++0x"
common_flags = "-Wall -std=c++0x -fPIC"
else:
common_flags = "-Wall -std=c++11"
common_flags = "-Wall -std=c++11 -fPIC"
opt_flags = " -O3 -g" + native
if gcc_version >= 71:
opt_flags = opt_flags + " -faligned-new"
Expand Down