Skip to content

Commit dff50eb

Browse files
author
Enrico Steffinlongo
committed
Switch gnu make build to c++17
Changing the C++ standard to C++ 17 on the gnu-make-based build-system
1 parent 9f2d209 commit dff50eb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

scripts/bash-autocomplete/extract_switches.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
cd `dirname $0`
77

88
echo "Compiling the helper file to extract the raw list of parameters from cbmc"
9-
g++ -E -dM -std=c++11 -I../../src ../../src/cbmc/cbmc_parse_options.cpp -o macros.c
9+
g++ -E -dM -std=c++17 -I../../src ../../src/cbmc/cbmc_parse_options.cpp -o macros.c
1010
echo CBMC_OPTIONS >> macros.c
1111

1212
echo "Converting the raw parameter list to the format required by autocomplete scripts"

scripts/check_help.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for t in \
3333
tool_name=$(basename $t)
3434
opt_name=$(echo $tool_name | tr 'a-z-' 'A-Z_')
3535
echo "Extracting the raw list of parameters from $tool_name"
36-
g++ -E -dM -std=c++11 -I../src -I../jbmc/src $t/*_parse_options.cpp -o macros.c
36+
g++ -E -dM -std=c++17 -I../src -I../jbmc/src $t/*_parse_options.cpp -o macros.c
3737
# goto-analyzer partly uses the spelling "analyser" within the code base
3838
echo ${opt_name}_OPTIONS | sed 's/GOTO_ANALYZER/GOTO_ANALYSER/' >> macros.c
3939
rawstring="`gcc -E -P -w macros.c` \"?h(help)\""

src/common

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ endif
3434
CP_CFLAGS = -MMD -MP
3535
CXXFLAGS ?= -Wall -O2
3636
ifeq ($(filter-out OSX OSX_Universal,$(BUILD_ENV_)),)
37-
CP_CXXFLAGS += -MMD -MP -mmacosx-version-min=10.15 -std=c++11 -stdlib=libc++
37+
CP_CXXFLAGS += -MMD -MP -mmacosx-version-min=10.15 -std=c++17 -stdlib=libc++
3838
CP_CFLAGS += -mmacosx-version-min=10.15
3939
LINKFLAGS += -mmacosx-version-min=10.15 -stdlib=libc++
4040
LINKNATIVE += -mmacosx-version-min=10.15 -stdlib=libc++
4141
else
42-
CP_CXXFLAGS += -MMD -MP -std=c++11
42+
CP_CXXFLAGS += -MMD -MP -std=c++17
4343
endif
4444
ifeq ($(filter -O%,$(CXXFLAGS)),)
4545
CP_CXXFLAGS += -O2
@@ -105,13 +105,13 @@ else ifeq ($(BUILD_ENV_),Cygwin)
105105
CFLAGS ?= -Wall -O2
106106
CXXFLAGS ?= -Wall -O2
107107
CP_CFLAGS = -MMD -MP
108-
CP_CXXFLAGS += -MMD -MP -std=c++11 -U__STRICT_ANSI__
108+
CP_CXXFLAGS += -MMD -MP -std=c++17 -U__STRICT_ANSI__
109109
# Cygwin-g++ has problems with statically linking exception code.
110110
# If linking fails, remove -static.
111-
LINKFLAGS = -static -std=c++11
111+
LINKFLAGS = -static -std=c++17
112112
LINKLIB = ar rcT $@ $^
113113
LINKBIN = $(CXX) $(LINKFLAGS) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LIBS)
114-
LINKNATIVE = $(HOSTCXX) $(HOSTLINKFLAGS) -std=c++11 -o $@ $^ -static
114+
LINKNATIVE = $(HOSTCXX) $(HOSTLINKFLAGS) -std=c++17 -o $@ $^ -static
115115
ifeq ($(origin CC),default)
116116
#CC = gcc
117117
CC = x86_64-w64-mingw32-gcc
@@ -136,7 +136,7 @@ else ifeq ($(BUILD_ENV_),MSVC)
136136
DEPEXT = .dep
137137
EXEEXT = .exe
138138
CFLAGS ?= /W3 /O2 /GF
139-
CXXFLAGS ?= /W3 /D_CRT_SECURE_NO_WARNINGS /O2 /GF
139+
CXXFLAGS ?= /W3 /D_CRT_SECURE_NO_WARNINGS /O2 /GF /std:c++17
140140
CP_CFLAGS =
141141
CP_CXXFLAGS +=
142142
LINKLIB = lib /NOLOGO /OUT:$@ $^

0 commit comments

Comments
 (0)