Skip to content
Snippets Groups Projects

[UPD] Enforce C++ version and improve setup.py flexibility

Merged Maxence Naud requested to merge upd_project-compilation into dev
5 files
+ 181
136
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 18
7
Include(FetchContent)
# Catch2 configuration
set(CATCH2_MIN_VERSION 3.3.0)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1 # or a later release
)
# Try to find system installed Catch2
find_package(Catch2 ${CATCH2_MIN_VERSION} QUIET)
FetchContent_MakeAvailable(Catch2)
if(NOT Catch2_FOUND)
message(STATUS "Catch2 not found in system, retrieving from git")
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG devel # or a later release
)
FetchContent_MakeAvailable(Catch2)
message(STATUS "Fetched Catch2 version ${Catch2_VERSION}")
else()
message(STATUS "Using system Catch2 version ${Catch2_VERSION}")
endif()
file(GLOB_RECURSE src_files "*.cpp")
Loading