summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--Makefile3
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e7ee314e7..f8757d0c88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,9 @@ option(WITH_EGL "Use EGL backend" OFF)
if(WITH_CXX11ABI)
set(MASON_CXXABI_SUFFIX -cxx11abi)
+ add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
+else()
+ add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()
if(WITH_OSMESA AND WITH_EGL)
diff --git a/Makefile b/Makefile
index 9323aa63d9..df5f0eadb5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
export BUILDTYPE ?= Debug
+export WITH_CXX11ABI ?= $(shell scripts/check-cxx11abi.sh)
ifeq ($(BUILDTYPE), Release)
else ifeq ($(BUILDTYPE), Debug)
@@ -293,7 +294,7 @@ $(LINUX_BUILD): $(BUILD_DEPS)
(cd $(LINUX_OUTPUT_PATH) && cmake -G Ninja ../../.. \
-DCMAKE_BUILD_TYPE=$(BUILDTYPE) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DWITH_CXX11ABI=$(shell scripts/check-cxx11abi.sh) \
+ -DWITH_CXX11ABI=${WITH_CXX11ABI} \
-DWITH_COVERAGE=${WITH_COVERAGE} \
-DWITH_OSMESA=${WITH_OSMESA} \
-DWITH_EGL=${WITH_EGL})