mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-15 09:54:33 +12:00
add g++12 (without a dash) detection, fix Makefile not accounting for a possibly missing gcc
This commit is contained in:
parent
7e50b03e39
commit
8ad8463bc5
14
Makefile
14
Makefile
|
@ -59,17 +59,23 @@ ifeq ($(CLANG_WORKS),false)
|
|||
#? Try to find a newer GCC version
|
||||
ifeq ($(shell command -v g++-12 >/dev/null; echo $$?),0)
|
||||
CXX := g++-12
|
||||
else ifeq ($(shell command -v g++12 >/dev/null; echo $$?),0)
|
||||
CXX := g++12
|
||||
else ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
|
||||
CXX := g++-11
|
||||
else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0)
|
||||
CXX := g++11
|
||||
else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0)
|
||||
CXX := g++
|
||||
else
|
||||
GCC_NOT_FOUND := true
|
||||
endif
|
||||
override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
|
||||
override CXX_VERSION_MAJOR := $(shell echo $(CXX_VERSION) | cut -d '.' -f 1)
|
||||
ifneq ($(shell test $(CXX_VERSION_MAJOR) -lt 10; echo $$?),0)
|
||||
GCC_WORKS := true
|
||||
ifndef GCC_NOT_FOUND
|
||||
override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
|
||||
override CXX_VERSION_MAJOR := $(shell echo $(CXX_VERSION) | cut -d '.' -f 1)
|
||||
ifneq ($(shell test $(CXX_VERSION_MAJOR) -lt 10; echo $$?),0)
|
||||
GCC_WORKS := true
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue