-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
44 lines (35 loc) · 1.44 KB
/
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
43
44
cmake_minimum_required(VERSION 3.20)
project(forek
VERSION 0.0.1
DESCRIPTION "A toolkit for authoring and parsing Temporal Logic formulae."
HOMEPAGE_URL "https://github.com/andersonjwan/forek"
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) # C++20 features are used in this project
# Disable vender-specific plugins by default.
#
# This is disabled to protect unwarrented linking of other extensions but can be
# overridden on a per-target basis.
set(CMAKE_CXX_EXTENSIONS OFF)
add_library(${PROJECT_NAME})
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS forek)
# Currently, all the headers must be publicly available as public `forek`
# headers rely on private implementation headers that rely on external headers.
#
# Until a solution is found, users interfacing with this library should
# exclusively include the library with the format <forek/...> to avoid accessing
# unintended headers.
target_include_directories(forek
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/specification>
SYSTEM $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/antlr4/runtime/Cpp/runtime/src/>
)
target_link_libraries(forek antlr4_static)
# Add the source directory of this project.
add_subdirectory(src)
add_subdirectory(external)
add_subdirectory(extras EXCLUDE_FROM_ALL)
# Examples
add_subdirectory(examples EXCLUDE_FROM_ALL)
add_subdirectory(tests EXCLUDE_FROM_ALL)