Skip to content

Commit

Permalink
Allow overriding the rego-cpp source location.
Browse files Browse the repository at this point in the history
This makes it easy for rego-cpp to use us for integration testing.
  • Loading branch information
davidchisnall committed Jun 6, 2024
1 parent 6120dea commit 022ffe3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@ cmake_minimum_required(VERSION 3.16)

project(cheriot-policy LANGUAGES CXX)


if (DEFINED ENV{REGOCPP_C_WRAPPER_REPO})
set(REGOCPP_C_WRAPPER_REPO $ENV{REGOCPP_C_WRAPPER_REPO})
else ()
set(REGOCPP_C_WRAPPER_REPO "https://github.com/microsoft/rego-cpp/")
endif ()

if (DEFINED ENV{REGOCPP_C_WRAPPER_TAG})
set(REGOCPP_C_WRAPPER_TAG $ENV{REGOCPP_C_WRAPPER_TAG})
else ()
set(REGOCPP_C_WRAPPER_TAG "cb967637dbf7cee25117203bbdf9c10b62dfb25a")
endif()

include(FetchContent)
FetchContent_Declare(
regocpp
GIT_REPOSITORY https://github.com/microsoft/rego-cpp.git
GIT_TAG cb967637dbf7cee25117203bbdf9c10b62dfb25a
GIT_REPOSITORY ${REGOCPP_C_WRAPPER_REPO}
GIT_TAG ${REGOCPP_C_WRAPPER_TAG}
)
FetchContent_MakeAvailable(regocpp)

Expand Down

0 comments on commit 022ffe3

Please sign in to comment.