-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
28 lines (22 loc) · 891 Bytes
/
Makefile
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
26
27
28
# Copyright (C) 2022 Toitware ApS.
# Use of this source code is governed by a Zero-Clause BSD license that can
# be found in the tests/LICENSE file.
all: test
.PHONY: build/CMakeCache.txt
build/CMakeCache.txt:
$(MAKE) rebuild-cmake
install-pkgs: rebuild-cmake
cmake --build build --target install-pkgs
test: install-pkgs rebuild-cmake
cmake --build build --target crash
cmake --build build --target check
# We rebuild the cmake file all the time.
# We use "glob" in the cmakefile, and wouldn't otherwise notice if a new
# file (for example a test) was added or removed.
# It takes <1s on Linux to run cmake, so it doesn't hurt to run it frequently.
rebuild-cmake:
mkdir -p build
# We need to set a build type, otherwise cmake won't run nicely on Windows.
# The build-type is otherwise unused.
cmake -B build -DCMAKE_BUILD_TYPE=Debug
.PHONY: all test rebuild-cmake install-pkgs