Skip to content

Commit b31f4ee

Browse files
committed
update to 17
1 parent 2d1dbbd commit b31f4ee

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

make/compiler_flags

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -119,33 +119,9 @@ INC_GTEST ?= -I $(GTEST)/include -I $(GTEST)
119119
## setup precompiler options
120120
CPPFLAGS_BOOST ?= -DBOOST_DISABLE_ASSERTS
121121
CPPFLAGS_SUNDIALS ?= -DNO_FPRINTF_OUTPUT $(CPPFLAGS_OPTIM_SUNDIALS) $(CXXFLAGS_FLTO_SUNDIALS)
122-
#CPPFLAGS_GTEST ?=
123-
STAN_HAS_CXX17 ?= false
124-
ifeq ($(CXX_TYPE), gcc)
125-
GCC_GE_73 := $(shell [ $(CXX_MAJOR) -gt 7 -o \( $(CXX_MAJOR) -eq 7 -a $(CXX_MINOR) -ge 1 \) ] && echo true)
126-
ifeq ($(GCC_GE_73),true)
127-
STAN_HAS_CXX17 := true
128-
endif
129-
else ifeq ($(CXX_TYPE), clang)
130-
CLANG_GE_5 := $(shell [ $(CXX_MAJOR) -gt 5 -o \( $(CXX_MAJOR) -eq 5 -a $(CXX_MINOR) -ge 0 \) ] && echo true)
131-
ifeq ($(CLANG_GE_5),true)
132-
STAN_HAS_CXX17 := true
133-
endif
134-
else ifeq ($(CXX_TYPE), mingw32-gcc)
135-
MINGW_GE_50 := $(shell [ $(CXX_MAJOR) -gt 5 -o \( $(CXX_MAJOR) -eq 5 -a $(CXX_MINOR) -ge 0 \) ] && echo true)
136-
ifeq ($(MINGW_GE_50),true)
137-
STAN_HAS_CXX17 := true
138-
endif
139-
endif
140122

141-
ifeq ($(STAN_HAS_CXX17), true)
142-
CXXFLAGS_LANG ?= -std=c++17
143-
CXXFLAGS_STANDARD ?= c++17
144-
else
145-
$(warning "Stan cannot detect if your compiler has the C++17 standard. If it does, please set STAN_HAS_CXX17=true in your make/local file. C++17 support is mandatory in the next release of Stan. Defaulting to C++14")
146-
CXXFLAGS_LANG ?= -std=c++1y
147-
CXXFLAGS_STANDARD ?= c++1y
148-
endif
123+
CXXFLAGS_LANG ?= -std=c++17
124+
CXXFLAGS_STANDARD ?= c++17
149125
#CXXFLAGS_BOOST ?=
150126
CXXFLAGS_SUNDIALS ?= -pipe $(CXXFLAGS_OPTIM_SUNDIALS) $(CPPFLAGS_FLTO_SUNDIALS)
151127
#CXXFLAGS_GTEST

0 commit comments

Comments
 (0)