Skip to content

Commit

Permalink
Merge a8bf93e into 48de77a
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jun 4, 2021
2 parents 48de77a + a8bf93e commit 6062bad
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/linux-full-tests.yml
Expand Up @@ -12,13 +12,11 @@ jobs:
tag: trusty
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
- name: "gcc 5.4 (Boost 1.66)"
shortname: gcc5
tag: xenial
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
- name: "gcc 6.3 (Boost 1.66)"
shortname: gcc6
tag: zesty
Expand Down Expand Up @@ -126,7 +124,6 @@ jobs:
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
configureflags: --enable-std-classes
- name: "auto_ptr re-enabled"
shortname: autoptr
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linux-nondefault.yml
Expand Up @@ -12,7 +12,6 @@ jobs:
tag: xenial
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
- name: "gcc 6.3 (Boost 1.66)"
shortname: gcc6
tag: zesty
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/linux.yml
Expand Up @@ -12,13 +12,11 @@ jobs:
tag: trusty
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
- name: "gcc 5.4 (Boost 1.66)"
shortname: gcc5
tag: xenial
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
- name: "gcc 6.3 (Boost 1.66)"
shortname: gcc6
tag: zesty
Expand Down Expand Up @@ -130,7 +128,6 @@ jobs:
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++11"
configureflags: --enable-std-classes
tests: true
- name: "auto_ptr re-enabled"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/macos-nondefault.yml
Expand Up @@ -9,7 +9,6 @@ jobs:
include:
- os: [macos-10.15]
shortname: default
cxxflags: "-std=c++11"
- os: [macos-10.15]
shortname: stdclasses
cxxflags: "-std=c++17"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/macos.yml
Expand Up @@ -9,10 +9,8 @@ jobs:
include:
- os: [macos-10.15]
shortname: default
cxxflags: "-std=c++11"
- os: [macos-10.15]
shortname: stdclasses
cxxflags: "-std=c++11"
configureflags: --enable-std-classes
steps:
- uses: actions/checkout@v2
Expand Down
29 changes: 29 additions & 0 deletions acinclude.m4
@@ -1,4 +1,33 @@

# QL_CHECK_CPP11
# --------------------
# Check whether C++11 features are supported by default.
# If not (e.g., with Clang on Mac OS) add -std=c++11
AC_DEFUN([QL_CHECK_CPP11],
[AC_MSG_CHECKING([for C++11 support])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[@%:@include <initializer_list>
struct S {
int i = 3;
double x = 3.5;
};
class C {
public:
C(int) noexcept;
C(std::initializer_list<int>);
S f() { return { 2, 1.5 }; }
};
]],
[[]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_WARN([Adding -std=c++11 to CXXFLAGS])
AC_SUBST([CXXFLAGS],["${CXXFLAGS} -std=c++11"])
])
])

# QL_CHECK_BOOST_DEVEL
# --------------------
# Check whether the Boost headers are available
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Expand Up @@ -74,6 +74,9 @@ if test "$ql_openmp" = "yes" ; then
AC_SUBST([CXXFLAGS],["${CXXFLAGS} ${OPENMP_CXXFLAGS}"])
fi

# Check for C++11 support
QL_CHECK_CPP11

# Check for Boost components
QL_CHECK_BOOST
AM_CONDITIONAL(BOOST_UNIT_TEST_FOUND, test "x${BOOST_UNIT_TEST_LIB}" != "x")
Expand Down

0 comments on commit 6062bad

Please sign in to comment.