-
Notifications
You must be signed in to change notification settings - Fork 1
/
bb.edn
25 lines (20 loc) · 1.08 KB
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{:tasks {:requires ([babashka.fs :as fs])
build:release
{:doc "Create a release build."
:task (do (when-not (fs/exists? "build") (fs/create-dir "build"))
(shell "cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Release")
(shell "cmake --build build/"))}
build:debug
{:doc "Create a debug build."
:task (do (when-not (fs/exists? "build") (fs/create-dir "build"))
(shell "cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug")
(shell "cmake --build build/"))}
test {:doc "Build and run tests."
:task (do (run 'build:debug)
(shell "./build/bin/test_liscpp --gtest_color=yes"))}
ctest:release
{:doc "Build and run tests on release build, with ctest."
:task (do (run 'build:release) (shell {:dir "build"} "ctest"))}
ctest:debug {:doc "Build and run tests on debug build, with ctest."
:task (do (run 'build:debug)
(shell {:dir "build"} "ctest"))}}}