From 7d95486a5569ad4da61b8ce69adfbbfcc045aed9 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Wed, 3 Mar 2021 10:52:56 +0100 Subject: [PATCH] clenup GNUmakefile to work with clang-tidy --- GNUmakefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 8e2f091..1b1c333 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -4,7 +4,7 @@ GENERATOR?=Ninja STAGEDIR?="${CURDIR}/stage" -CMAKE_PRESET:=-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=${STAGEDIR} +CMAKE_PRESET:=-G "${GENERATOR}" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=${STAGEDIR} #XXX export CXX=clang++ @@ -14,7 +14,7 @@ export CPM_SOURCE_CACHE=${HOME}/.cache/CPM .PHONY: update format all test standalone doc check clean distclean lock # the default target does just all, but neither standalone nor doc -all: +test: clean: find . -type d -name build | xargs rm -rf @@ -35,9 +35,9 @@ lock: all standalone doc # install the library to stagedir install: - cmake -S . -B build/$@ ${CMAKE_PRESET} -DCMAKE_INSTALL_PREFIX=${STAGEDIR} -DCMAKE_CXX_STANDARD=20 # --trace-expand + cmake -S . -B build/$@ ${CMAKE_PRESET} -DCMAKE_INSTALL_PREFIX=${STAGEDIR} -DCMAKE_CXX_STANDARD=20 #NO! -DCMAKE_CXX_CLANG_TIDY=clang-tidy # --trace-expand cmake --build build/$@ --target $@ - perl -i.bak -pe 's#$$CPM_SOURCE_CACHE-I#-isystem $$1#g' build/install/compile_commands.json + perl -i.bak -pe 's#-I($$CPM_SOURCE_CACHE)#-isystem $$1#g' build/install/compile_commands.json run-clang-tidy.py -p build/$@ source # test the library @@ -47,11 +47,11 @@ test: install cmake --build build/$@ --target $@ # all together -all: test +all: #XXX test cmake -S $@ -B build/$@ ${CMAKE_PRESET} -DENABLE_TEST_COVERAGE=1 -DUSE_STATIC_ANALYZER=clang-tidy cmake --build build/$@ cmake --build build/$@ --target test - # cmake --build build/$@ --target check-format + #XXX cmake --build build/$@ --target check-format # GenerateDocs doc: