Repository navigation
Expand file tree
/
Copy pathtargets.cmake
More file actions
65 lines (56 loc) · 1.38 KB
/
Copy pathtargets.cmake
File metadata and controls
65 lines (56 loc) · 1.38 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#[[
this file contains global top-level targets that are shared across potentially
multiple projects all using cakemake. The `include_guard` prevents these
targets from being created more than once
All targets in this file are executed in the context of `CMAKE_BINARY_DIR`,
which always points to the root binary directory, as opposed to
`PROJECT_BINARY_DIR` which points to the binary directory for the current
`project(...)` context
]]
include_guard(GLOBAL)
#noop command
#top-level clean target
add_custom_target(
clean-all
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --target clean
VERBATIM
)
#top-level build tests target
add_custom_target(
build-test-all
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND exit
VERBATIM
)
#top-level run tests target
add_custom_target(
test-all
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND exit
VERBATIM
)
add_dependencies(test-all build-test-all)
#top-level test coverage target
add_custom_target(
coverage
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND exit
VERBATIM
)
#top-level clean coverage target
add_custom_target(
clean-coverage
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND exit
VERBATIM
)
add_dependencies(clean-all clean-coverage)
#TODO: top-level benchmark target
#top-level CI target
add_custom_target(
ci
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMAND exit
VERBATIM
)