Skip to content

Commit

Permalink
Set C++ standard to 14
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Dec 23, 2024
1 parent 7ad9b36 commit af1eef1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion recipes/ghostx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -xe

cd ./src/

CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" make -j"${CPU_COUNT}"
CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS}" make -j"${CPU_COUNT}"

mkdir -p $PREFIX/bin
install -m 755 ghostx $PREFIX/bin
13 changes: 9 additions & 4 deletions recipes/ghostx/ghostx-makefile.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git i/src/Makefile w/src/Makefile
index 8844e0a..93e4701 100644
index 8844e0a..3248657 100644
--- i/src/Makefile
+++ w/src/Makefile
@@ -1,9 +1,9 @@
Expand All @@ -15,16 +15,21 @@ index 8844e0a..93e4701 100644
LDLIBS =-lm -fopenmp

ifeq ($(PROFILE), Yes)
@@ -69,7 +69,7 @@ OBJS += $(CPP_SRC:%.cpp=%.o)
@@ -69,18 +69,18 @@ OBJS += $(CPP_SRC:%.cpp=%.o)
all:ghostx

ghostx: $(OBJS)
- $(LAST_CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
+ $(CXX) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
+ $(CXX) -std=c++14 -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)

.c.o:
$(CC) -c $(CC_FLAGS) $< -o $@ $(INCLUDES)
@@ -81,6 +81,6 @@ ghostx: $(OBJS)

.cpp.o:
- $(CXX) -c $(CC_FLAGS) $< -o $@ $(INCLUDES)
+ $(CXX) -std=c++14 -c $(CC_FLAGS) $< -o $@ $(INCLUDES)



.PHONY: clean
clean:
Expand Down

0 comments on commit af1eef1

Please sign in to comment.