summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-02-22 19:35:30 +0100
committerFedja Beader <fedja@protonmail.ch>2025-02-22 19:50:51 +0100
commit7919681c7efd589dc70d9b67e7648a9ddfbd1764 (patch)
tree7eb8ca5637cfd12be767300dc7d1b0a8d4562096 /src
parentbb5d5bef365c65fed4fa32c3ac2ce384b2ea4e52 (diff)
downloadmanaplus-7919681c7efd589dc70d9b67e7648a9ddfbd1764.tar.gz
manaplus-7919681c7efd589dc70d9b67e7648a9ddfbd1764.tar.bz2
manaplus-7919681c7efd589dc70d9b67e7648a9ddfbd1764.tar.xz
manaplus-7919681c7efd589dc70d9b67e7648a9ddfbd1764.zip
Set C++11 as default C++ standard
Autoconf manual states that CXXFLAGS is a user variable and should not be overriden, so I did not use AX_APPEND_COMPILE_FLAGS for this. Thus, there are not checks if the compiler supports it, but also the builder can override this flag by passing another flag that overrides it on the command line. Okay, this is now way too theoretical. Indeed, the override happens with ./configure 'CXXFLAGS=-std=c++17' (both flags in final command line) Do note: - The standard has not explicitly set for some builds (thus compiler default was used) - The default on my own box is C++17 - I'm setting C++11 as that's required by my previous change. Upgrade to C++17 is deferred to until it becomes required. - The use of CPPFLAGS could be reviewed... they may be used incorrectly (instead of CXXFLAGS).
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a1934ac22..8f8b47699 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,10 +48,12 @@ manaplustests_CXXFLAGS += -DUNITTESTS_EMBED
endif
endif
-dyecmd_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
+dyecmd_CXXFLAGS = -std=c++11 \
+ -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-Wall
-manaplus_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
+manaplus_CXXFLAGS = -std=c++11 \
+ -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-Wall