Skip to content

Commit

Permalink
Require the C++11 standard when compiling kyua
Browse files Browse the repository at this point in the history
Kyua implicitly tests out C++11 compilers, but doesn't make the
requirement explicit. In order to leverage modern C++ language features,
e.g., `std::regex`, et al, it's best to explicitly require a C++11
capable compiler and to explicitly set the compiler to support the C++11
standard.

This allows Kyua to use modern C++ features without having to
import/rely on the Boost libraries when executing/scraping content from
tests.

Remove `KYUA_REQUIRE_CXX` as it's a superfluous check now.

Add a news entry for the -std=c++-11 change/requirement

=== Notes about ax_cxx_compile_stdcxx.m4 ===

ax_cxx_compile_stdcxx.m4 comes from the autoconf-archive Savannah git repo

This file allows autoconf end-users to specifically require and test
versions of the C++ standard.

More information about the macros contained and the file can be found
[here](https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html).

This file can be downloaded via [this link](http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4;h=43087b2e6889ec6f8ebd2f8ba77f4a9a716f8ac2;hb=44f18a92d5b6956997a9765e62711d5c70d4c2b1).

Signed-off-by: Enji Cooper <[email protected]>
  • Loading branch information
ngie-eign authored and jmmv committed Mar 14, 2019
1 parent e6dd883 commit bf8eb10
Show file tree
Hide file tree
Showing 4 changed files with 953 additions and 23 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Changes in version 0.14

**NOT RELEASED YET; STILL UNDER DEVELOPMENT.**

* No changes recorded.
* Explicitly require C++11 language features when compiling Kyua.


Changes in version 0.13
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ AM_INIT_AUTOMAKE([1.9 foreign subdir-objects -Wall])

AC_LANG([C++])
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
KYUA_REQUIRE_CXX
KYUA_DEVELOPER_MODE([C++])
KYUA_ATTRIBUTE_NORETURN
KYUA_ATTRIBUTE_PURE
Expand Down
Loading

0 comments on commit bf8eb10

Please sign in to comment.