From ff95e937a02be82b31364ffe94ee33d67ebe8c6d Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 9 Dec 2021 20:32:51 -0600 Subject: [PATCH] chore: use task instead of make make is very slow on Windows and causes a lot of problems overall --- Makefile | 21 --------------------- Taskfile.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 Makefile create mode 100644 Taskfile.yml diff --git a/Makefile b/Makefile deleted file mode 100644 index 0d5e30a2..00000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -.PHONY: test format lint - -test: - cmake ./test -B ./test/build -DCMAKE_BUILD_TYPE:STRING=Debug - cmake --build ./test/build --config Debug - cd ./test/build && ctest -C Debug --verbose - -format: - clang-format -i ./test/*.cpp - cmake-format --in-place ./Index.cmake ./src/*.cmake - -lint: - cmake-lint ./Index.cmake ./src/*.cmake - -clean: -# clean ./test/build -ifeq ($(OS), Windows_NT) - pwsh -C 'if (Test-Path ./test/build) { rm -r -force ./test/build }' -else - rm -rf ./test/build -endif \ No newline at end of file diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 00000000..a0134e1a --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,16 @@ +# https://taskfile.dev/#/installation +version: 3 + +tasks: + test: + - cmake ./test -B ./test/build -DCMAKE_BUILD_TYPE:STRING=Debug -G "Ninja Multi-Config" + - cmake --build ./test/build --config Debug + - cd ./test/build && ctest -C Debug --verbose + + format: + - clang-format -i ./test/*.cpp + - cmake-format --in-place ./Index.cmake ./src/*.cmake + + lint: cmake-lint ./Index.cmake ./src/*.cmake + + clean: 'cd test && {{if eq OS "windows"}} cmd /c "if exist build ( rmdir /s/q build )" {{else}} rm -rf build {{end}}'