CPM for fetch_content

This commit is contained in:
David Coeurjolly 2025-02-12 11:49:00 +01:00
parent 54c84ab18d
commit 604d9363dd
5 changed files with 1291 additions and 22 deletions

View File

@ -1,9 +1,11 @@
project(CGDI-c++)
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

1269
cmake/CPM.cmake Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,10 @@ if (TARGET geometry-central)
return()
endif()
include(FetchContent)
include(CPM)
message(STATUS "Fetching geometry-central")
FetchContent_Declare(
geometry-central
GIT_REPOSITORY https://github.com/nmwsharp/geometry-central.git
GIT_SHALLOW TRUE
CPMAddPackage(
NAME geometry-central
GIT_TAG 70c859ec3b58fe597c0063673a74082654e9c5aa
GITHUB_REPOSITORY "nmwsharp/geometry-central"
)
FetchContent_MakeAvailable(geometry-central)

View File

@ -2,14 +2,15 @@ if (TARGET polyscope)
return()
endif()
include(FetchContent)
include(CPM)
message(STATUS "Fetching polyscope")
set(CMAKE_CXX_FLAGS_DEBUG_OLD "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "-w")
FetchContent_Declare(
polyscope
GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
GIT_TAG v1.2.0
GIT_SHALLOW TRUE
CPMAddPackage(
NAME polyscope
VERSION 2.3.0
GITHUB_REPOSITORY "nmwsharp/polyscope"
)
FetchContent_MakeAvailable(polyscope)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_OLD}")