Added CMake option to build using specific llvm version

This commit is contained in:
Bartek Kryza
2022-02-12 19:08:07 +01:00
parent b11396cbf3
commit 47554060f4
4 changed files with 36 additions and 8 deletions

View File

@@ -22,6 +22,8 @@
NUMPROC ?= $(shell nproc)
LLVM_CONFIG_PATH ?=
.PHONY: clean
clean:
rm -rf debug release
@@ -29,16 +31,18 @@ clean:
debug/CMakeLists.txt:
cmake -S . -B debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=Debug \
-DLLVM_CONFIG_PATH=$(LLVM_CONFIG_PATH)
release/CMakeLists.txt:
cmake -S . -B release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_CONFIG_PATH=$(LLVM_CONFIG_PATH)
debug: debug/CMakeLists.txt
echo "Using ${NUMPROC} cores"
make -C debug -j$(NUMPROC) VERBOSE=1
make -C debug -j$(NUMPROC)
release: release/CMakeLists.txt
make -C release -j