Skip to content

Commit

Permalink
Merge pull request #1092 from LourensVeen/sakura-cpp-17
Browse files Browse the repository at this point in the history
Compile sakura as C++11 to avoid std::data clash
  • Loading branch information
LourensVeen authored Nov 14, 2024
2 parents 411ca13 + c2e9a71 commit 76d8eb6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/amuse/community/sakura/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ CC = $(MPICC)
CXX = $(MPICXX)

CXXFLAGS ?= -Wall -g -O2
CXXFLAGS += -std=c++11


CODELIB = src/libsakura.a
OBJ = interface.o

all: sakura_worker
all: sakura_worker

clean:
rm -f *.so *.o *.pyc worker_code.cc worker_code.h
rm -f *.so *.o *.pyc worker_code.cc worker_code.h
rm -f *~ sakura_worker
make -C src clean

$(CODELIB):
make -C src all
make -C src all CXXFLAGS="$(CXXFLAGS)"

worker_code.cc: interface.py
$(CODE_GENERATOR) --type=c interface.py SakuraInterface -o $@
Expand All @@ -37,5 +38,5 @@ sakura_worker: worker_code.cc worker_code.h $(CODELIB) $(OBJ)
$(MPICXX) $(CXXFLAGS) $(SC_FLAGS) $(LDFLAGS) -I./src $< $(CODELIB) $(OBJ) -o $@ -L./src -lsakura $(SC_CLIBS)

interface.o: interface.cc
$(MPICXX) $(CXXFLAGS) $(SC_FLAGS) -I./src -c -o $@ $<
$(MPICXX) $(CXXFLAGS) $(SC_FLAGS) -I./src -c -o $@ $<

0 comments on commit 76d8eb6

Please sign in to comment.