diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 36232f0..9b569ed 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -16,11 +16,7 @@ jobs: with: fetch-depth: 1 submodules: true - - name: Install Clang 15 - run: | - export HOMEBREW_NO_INSTALL_CLEANUP=TRUE - brew install --force llvm - name: make - run: make OS=Github - - name: make test - run: make test OS=Github + run: make + - name: make run_tests + run: make run_tests diff --git a/Makefile b/Makefile index d883564..5b6777a 100644 --- a/Makefile +++ b/Makefile @@ -13,30 +13,24 @@ OS = $(shell uname -s) endif ifeq ($(OS),Linux) -CC = /usr/lib/llvm-18/bin/clang -CXX = /usr/lib/llvm-18/bin/clang++ -CXXFLAGS = -pthread -I/usr/lib/llvm-18/include/c++/v1 -LDFLAGS = -lc++ -L/usr/lib/llvm-18/lib/c++ +CC := /usr/lib/llvm-18/bin/clang +CXX := /usr/lib/llvm-18/bin/clang++ +CXXFLAGS = -pthread -I/usr/local/include +LDFLAGS = -L/usr/local/lib +CXXFLAGS += -std=c++23 -Wno-reserved-module-identifier endif ifeq ($(OS),Darwin) -CC = /opt/homebrew/opt/llvm/bin/clang -CXX = /opt/homebrew/opt/llvm/bin/clang++ -CXXFLAGS =-I/opt/homebrew/opt/llvm/include/c++/v1 -Ofast -LDFLAGS = -L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++ -Ofast +CC := /Library/Developer/CommandLineTools/usr/bin/clang +CXX := /Library/Developer/CommandLineTools/usr/bin/clang++ +CXXFLAGS = -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk +CXXFLAGS += -std=c++2b endif -ifeq ($(OS),Github) -CC = /usr/local/opt/llvm/bin/clang -CXX = /usr/local/opt/llvm/bin/clang++ -CXXFLAGS = -I/usr/local/opt/llvm/include/ -I/usr/local/opt/llvm/include/c++/v1 -LDFLAGS = -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++ -endif - -CXXFLAGS += -std=c++23 -stdlib=libc++ -CXXFLAGS += -Wall -Wextra -Wno-reserved-module-identifier -Wno-deprecated-declarations +CXXFLAGS += -stdlib=libc++ -Wall -Wextra +CXXFLAGS += -Wno-deprecated-declarations CXXFLAGS += -I$(sourcedir) -LDFLAGS += -fuse-ld=lld +LDFLAGS += -fuse-ld=lld -lc++ export CC export CXX @@ -182,4 +176,4 @@ mostlyclean: .PHONY: dump dump: $(foreach v, $(sort $(.VARIABLES)), $(if $(filter file,$(origin $(v))), $(info $(v)=$($(v))))) - @echo '' \ No newline at end of file + @echo ''