Skip to content

Commit 737fdbe

Browse files
authored
Enforce cpp17 (#2006)
* Updated makefiles * fixed typo * undo changes to test that snuck in * Found more 11s and 14s lurking about
1 parent 1d6f37b commit 737fdbe

File tree

18 files changed

+9
-18
lines changed

18 files changed

+9
-18
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
export TRICK_HOME = $(CURDIR)
1515

16+
TRICK_CXXFLAGS += -std=c++17
17+
1618
# Include the build configuration information.
1719
include $(TRICK_HOME)/share/trick/makefiles/Makefile.common
1820

libexec/trick/make_makefile_swig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sub read_files_to_process() {
3232

3333
# Prepend -I to each include path before we pass them to the compiler
3434
my @include_paths = map("-I$_", (get_include_paths(), "$ENV{TRICK_HOME}/include", "$ENV{TRICK_HOME}/include/trick/compat", "$ENV{TRICK_HOME}/trick_source", "../include")) ;
35-
my @defines = (get_defines(), "-DTRICK_VER=$year", "-DSWIG", "-std=c++11") ;
35+
my @defines = (get_defines(), "-DTRICK_VER=$year", "-DSWIG") ;
3636

3737
# get the list of header files from the compiler
3838
open FILE_LIST, "$cc -MM @include_paths @defines S_source.hh |" ;

share/trick/makefiles/Makefile.tricklib

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ $(TRICK_LIB_DIR):
9494
$(IO_C_OBJS): $(OBJ_DIR)/%.o : $(IO_SRC_DIR)%.c | $(OBJ_DIR)
9595
$(TRICK_CC) $(TRICK_CFLAGS) $(TRICK_SYSTEM_CFLAGS) -c $< -o $@
9696

97-
$(IO_CPP_OBJS): TRICK_SYSTEM_CXXFLAGS += -std=c++11
9897
$(IO_CPP_OBJS): TRICK_SYSTEM_CXXFLAGS += -Wno-invalid-offsetof
9998
ifeq ($(IS_CC_CLANG), 0)
10099
# cannot get an "expr" command to work on all platforms. Falling back to reliable perl. :)

share/trick/makefiles/config_Linux.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ ifeq "" "c++14"
6565
TRICK_ADDITIONAL_CXXFLAGS += -std=c++14 -D_HAVE_STL_RANDOM
6666
endif
6767

68-
TRICK_ADDITIONAL_TEST_FLAGS += -std=c++14
68+
TRICK_ADDITIONAL_TEST_FLAGS += -std=c++17
6969

share/trick/makefiles/trickify.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $(dir $(TRICKIFY_OBJECT_NAME)) $(BUILD_DIR) $(dir $(TRICKIFY_PYTHON_DIR)) .trick
135135

136136
$(IO_OBJECTS): %.o: %.cpp
137137
$(info $(call COLOR,Compiling) $<)
138-
$(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -std=c++11 -Wno-invalid-offsetof -MMD -MP -c -o $@ $<)
138+
$(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -Wno-invalid-offsetof -MMD -MP -c -o $@ $<)
139139

140140
$(IO_OBJECTS:.o=.d): %.d: ;
141141

trick_source/data_products/makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../..)
66

7-
TRICK_CXXFLAGS += -std=c++11
8-
97
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
108

119
LIB_DIR = lib_${TRICK_HOST_CPU}

trick_source/sim_services/DataRecord/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefi
22
include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
33
-include Makefile_deps
44

5-
TRICK_CXXFLAGS += -std=c++11
65

76
ifneq ($(HDF5),)
87
ifneq ($(HDF5),/usr)

trick_source/sim_services/Message/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefi
22
include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
33
-include Makefile_deps
44

5-
TRICK_CXXFLAGS += -std=c++11

trick_source/sim_services/MonteCarlo/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
33

44
-include Makefile_deps
55

6-
TRICK_CXXFLAGS += -std=c++11
76

87
ifeq ($(HAVE_GSL),1)
98
TRICK_CXXFLAGS += -D_HAVE_GSL
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefile.common
22
include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
3-
TRICK_CXXFLAGS += -std=c++11
43
-include Makefile_deps

0 commit comments

Comments
 (0)