-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
42 lines (37 loc) · 929 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.12)
project(dispak)
# Get the tag
execute_process(
COMMAND git describe --tags --abbrev=0
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the revision count
execute_process(
COMMAND git rev-list HEAD --count
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REVCOUNT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#
# Build subdirectories.
#
add_subdirectory(dispak)
add_subdirectory(besmtool)
add_subdirectory(disbesm6)
#
# Add 'make test' target.
#
find_package(Python3 COMPONENTS Interpreter)
if(Python3_Interpreter_FOUND)
enable_testing()
add_subdirectory(tests)
endif()