From ba9a17d8610fdec9f8e7e253a1d97f1479e49628 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 26 Jan 2021 19:18:36 +0000 Subject: [PATCH] build: Use -std=c++17 Notably this includes [std::optional](https://en.cppreference.com/w/cpp/utility/optional) which I'd like to use. The dnf-5-devel branch uses this too, and C++-17 is now well supported in current GCC, which is available in RHEL8 DTS too. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index dcf261bf..81290c9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,7 +49,7 @@ warn_only_c_flags = -Werror=strict-prototypes \ # that project for more information about e.g. -fno-strict-aliasing AM_CFLAGS += -std=gnu11 -fno-strict-aliasing $(WARN_CFLAGS) $(warn_only_c_flags) # Our default CXX flags -AM_CXXFLAGS += -std=c++14 -fno-strict-aliasing $(WARN_CFLAGS) +AM_CXXFLAGS += -std=c++17 -fno-strict-aliasing $(WARN_CFLAGS) # bundled libdnf; --enable-new-dtags emits DT_RUNPATH instead of deprecated DT_RPATH, which # can't be overridden by LD_LIBRARY_PATH; which is useful for uninstalled runs/tests AM_LDFLAGS += "-Wl,-rpath=$(libdir)/rpm-ostree,--enable-new-dtags"