Skip to content

Commit

Permalink
Use C++14 by default (#7965)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Oct 9, 2021
1 parent 188f375 commit 618c742
Show file tree
Hide file tree
Showing 8 changed files with 976 additions and 185 deletions.
10 changes: 2 additions & 8 deletions OMCompiler/configure.ac
Expand Up @@ -299,14 +299,8 @@ AC_LANG_POP([C++])

fi

m4_include([common/m4/ax_cxx_compile_stdcxx_11.m4])
HAVE_CXX_STD=0
for flag in $CXXFLAGS; do
(echo $flag | grep -q "^-std=") && HAVE_CXX_STD=1
done
if test "$HAVE_CXX_STD" = 0; then
AX_CXX_COMPILE_STDCXX_11([noext],[optional])
fi
m4_include([common/m4/ax_cxx_compile_stdcxx.m4])
AX_CXX_COMPILE_STDCXX(14,[noext],[optional])

if test "`getconf LONG_BIT`" = "32"; then
dnl Simulations spin forever unless -msse2 -mfpmath=sse is set
Expand Down
8 changes: 5 additions & 3 deletions OMEdit/configure.ac
Expand Up @@ -18,7 +18,7 @@ AC_SUBST(LIB_BOOST_REGEX)
m4_include([common/m4/pre-commit.m4])
cp common/install-sh common/config.guess common/config.sub ./
m4_include([common/m4/ombuilddir.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx.m4])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
Expand All @@ -29,8 +29,10 @@ test -z "$CXXFLAGS" && CXXFLAGS="$CFLAGS"
AC_LANG([C++])
AC_PROG_CC
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])

AX_CXX_COMPILE_STDCXX(17, [noext],[optional])
if test "$ax_cv_cxx_compile_cxx17__std_cpp17" != "yes"; then
AX_CXX_COMPILE_STDCXX(14, [noext],[mandatory])
fi
host_short=$host_cpu-$host_os

m4_include([common/m4/qmake.m4])
Expand Down
4 changes: 2 additions & 2 deletions OMNotebook/configure.ac
Expand Up @@ -12,7 +12,7 @@ AC_SUBST(host_short)
m4_include([common/m4/pre-commit.m4])
cp common/install-sh common/config.guess common/config.sub ./
m4_include([common/m4/ombuilddir.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx.m4])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
Expand All @@ -23,7 +23,7 @@ AC_LANG([C++])
test -z "$CXXFLAGS" && CXXFLAGS="$CFLAGS"
AC_PROG_CC
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AX_CXX_COMPILE_STDCXX(14,[noext],[mandatory])

host_short=$host_cpu-$host_os

Expand Down
4 changes: 2 additions & 2 deletions OMPlot/configure.ac
Expand Up @@ -12,7 +12,7 @@ AC_SUBST(host_short)

m4_include([common/m4/ombuilddir.m4])
m4_include([common/m4/pre-commit.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx.m4])
cp common/install-sh common/config.guess common/config.sub ./

AC_CANONICAL_BUILD
Expand All @@ -26,7 +26,7 @@ test -z "$CXXFLAGS" && CXXFLAGS="$CFLAGS"
AC_LANG([C++])
AC_PROG_CC
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AX_CXX_COMPILE_STDCXX(14,[noext],[mandatory])

host_short=$host_cpu-$host_os

Expand Down
2 changes: 1 addition & 1 deletion OMPlot/qwt/Makefile.unix.in
Expand Up @@ -14,7 +14,7 @@ all: build

Makefile: qwt.pro
@rm -f $@
$(QMAKE) QMAKE_CXX=@CXX@ QMAKE_CXXFLAGS="@CXXFLAGS@" QMAKE_LINK="@CXX@" qwt.pro
$(QMAKE) QMAKE_CXX="@CXX@" QMAKE_CXXFLAGS="@CXXFLAGS@" QMAKE_LINK="@CXX@" qwt.pro
clean:
test ! -f Makefile || $(MAKE) -f Makefile clean
rm -rf build lib Makefile
Expand Down
4 changes: 2 additions & 2 deletions OMShell/configure.ac
Expand Up @@ -13,7 +13,7 @@ AC_SUBST(host_short)
m4_include([common/m4/pre-commit.m4])
cp common/install-sh common/config.guess common/config.sub ./
m4_include([common/m4/ombuilddir.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx_11.m4])
m4_include([common/m4/ax_cxx_compile_stdcxx.m4])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
Expand All @@ -24,7 +24,7 @@ test -z "$CXXFLAGS" && CXXFLAGS="$CFLAGS"
AC_LANG([C++])
AC_PROG_CXX
AC_PROG_CC
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AX_CXX_COMPILE_STDCXX(14,[noext],[mandatory])

host_short=$host_cpu-$host_os

Expand Down

0 comments on commit 618c742

Please sign in to comment.