mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 08:48:48 +08:00
mdbx-make: extpanded list of c++std for probing.
This commit is contained in:
parent
8870d33fcd
commit
7179823d56
@ -35,7 +35,7 @@ CFLAGS ?= -std=gnu11 -O2 -g -Wall -Werror -Wextra -Wpedantic -ffunction-section
|
||||
# -Wno-tautological-compare
|
||||
CXX ?= g++
|
||||
# Choosing C++ standard with deferred simple variable expansion trick
|
||||
CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++14 c++14 gnu+11 c++11; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>/dev/null >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD)
|
||||
CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++23 c++23 gnu++2b c++2b gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++1z c++1z gnu++14 c++14 gnu++1y c++1y gnu+11 c++11 gnu++0x c++0x; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>std-$$$${std}.err >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD)
|
||||
CXXFLAGS = $(CXXSTD) $(filter-out -std=gnu11,$(CFLAGS))
|
||||
|
||||
# TIP: Try append '--no-as-needed,-lrt' for ability to built with modern glibc, but then use with the old.
|
||||
|
Loading…
x
Reference in New Issue
Block a user