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

Disable broken -DTOOLBOX so we can pass in CXXFLAGS from the environment #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LourensVeen
Copy link

The main SeBa Makefile as well as several other Makefiles add -DTOOLBOX to CXXFLAGS. This flag seems to enable some extra code when applied.

Unfortunately that code is broken in various ways, causing compile errors. When compiling SeBa, this is hidden because the recursion in the Makefiles isn't implemented in the usual way, so that CXXFLAGS isn't passed on recursive calls, so that the flag gets dropped again on the way down, and is never actually applied.

If CXXFLAGS is set by the user, perhaps because they want to specify some more optimisation flags or because they're trying to make a package, the behaviour of make changes, and CXXFLAGS is passed down the line. As a result, the code is compiled with -DTOOLBOX in that case, and compilation fails.

make clean
# this works
make
make clean
# this breaks
CXXFLAGS="" make

It seems that this issue has been around for a long time, and that probably the code enabled by -DTOOLBOX isn't really used by anyone. I don't have time to fix it, but I would like to get rid of the weird work-around that AMUSE currently has to do to get SeBa to compile. So I'm submitting this PR that removes -DTOOLBOX from the Makefiles, so that I can compile normally and also pass the extra CXXFLAGS that I need when packaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant