-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
36 lines (27 loc) · 928 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
cmake_minimum_required(VERSION 3.16)
project(cheriot-policy LANGUAGES CXX)
if (DEFINED ENV{REGOCPP_REPO})
set(REGOCPP_REPO $ENV{REGOCPP_REPO})
else ()
set(REGOCPP_REPO "https://github.com/microsoft/rego-cpp/")
endif ()
if (DEFINED ENV{REGOCPP_TAG})
set(REGOCPP_TAG $ENV{REGOCPP_TAG})
else ()
set(REGOCPP_TAG "v0.4.5")
endif()
include(FetchContent)
FetchContent_Declare(
regocpp
GIT_REPOSITORY ${REGOCPP_REPO}
GIT_TAG ${REGOCPP_TAG}
)
FetchContent_MakeAvailable(regocpp)
FetchContent_Declare(nlohmann_json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
FetchContent_MakeAvailable(nlohmann_json)
add_executable(cheriot-audit audit.cc)
set_property(TARGET cheriot-audit PROPERTY CXX_STANDARD 20)
target_link_libraries(cheriot-audit PRIVATE regocpp::rego)
target_link_libraries(cheriot-audit PRIVATE nlohmann_json::nlohmann_json)
enable_testing()
add_subdirectory("Tests")