commit 2479ab6ee9427e7f702375e2f8b204bda60d51db
parent adf910274647666a46c548761fa618932f177753
Author: cfillion <cfillion@users.noreply.github.com>
Date: Mon, 30 Jul 2018 13:36:16 -0400
allow using a different compiler on Linux
Diffstat:
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -39,6 +39,13 @@ tup, Ruby and PHP.
Install libraries and development files for Boost (1.56 or newer), Catch2,
libcurl (7.52 or newer), SQLite3 and zlib matching the target architecture(s).
+#### Custom compiler
+
+Set the `CXX` environement variable to select a different compiler
+(default is `gcc` if unset).
+
+ CXX=gcc-8 tup x64
+
#### Custom libcurl
Set the `CURLSO` environment variable to override the system default libcurl
diff --git a/linux.tup b/linux.tup
@@ -1,4 +1,5 @@
-CXX := gcc
+export CXX
+CXX := ${CXX:-gcc}
REAPACK_FILE = reaper_reapack@(SUFFIX).so
@@ -6,12 +7,13 @@ CXXFLAGS := -Wall -Wextra -Werror
CXXFLAGS += -Wno-unused-parameter -Wno-missing-field-initializers
CXXFLAGS += -Wno-unused-function -Wno-missing-braces
CXXFLAGS += -fdiagnostics-color -fstack-protector-strong -fvisibility=hidden
-CXXFLAGS += -pipe -fPIC -O2 -std=c++17 -m@(SUFFIX)
+CXXFLAGS += -pipe -fPIC -O2 -m@(SUFFIX)
CXXFLAGS += -Ivendor -Ivendor/WDL -Ivendor/WDL/WDL -Ivendor/WDL/WDL/swell
CXXFLAGS += -DWDL_NO_DEFINE_MINMAX -DSWELL_PROVIDED_BY_APP -DSWELL_TARGET_GDK
CXXFLAGS += -DREAPACK_FILE=\"$(REAPACK_FILE)\"
-WDLFLAGS := -std=c++98 -w
+SRCFLAGS := -std=c++17
+WDLFLAGS := -w
SWELL := $(WDL)/swell
WDLSOURCE += $(SWELL)/swell-modstub-generic.cpp