Shared CMake helpers for the OpenVicProject repos (OpenVic, openvic-simulation, openvic-dataloader, lexy-vdf).
Each consuming repo fetches this repo as a pinned FetchContent tarball
if(NOT COMMAND openvic_setup_base_flags)
include(FetchContent)
FetchContent_Declare(
openvic_scripts
URL "https://github.com/OpenVicProject/scripts/archive/<SHA>.tar.gz"
URL_HASH SHA256=<SHA256>
)
FetchContent_MakeAvailable(openvic_scripts)
include("${openvic_scripts_SOURCE_DIR}/cmake/OpenVicScripts.cmake")
endif()After a change lands on master here:
- Note the new commit SHA.
- Compute the tarball hash:
curl -sL https://github.com/OpenVicProject/scripts/archive/<SHA>.tar.gz | sha256sum
- In the consumer's root
CMakeLists.txtbootstrap block, update theURLSHA and theURL_HASH SHA256=value.
To test uncommitted changes to this repo from a consumer, configure the consumer with:
cmake --preset <preset> -DFETCHCONTENT_SOURCE_DIR_OPENVIC_SCRIPTS=<path-to-this-checkout>