CPM for fetch_content
This commit is contained in:
parent
54c84ab18d
commit
604d9363dd
@ -1,9 +1,11 @@
|
|||||||
project(CGDI-c++)
|
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_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
1269
cmake/CPM.cmake
Normal file
1269
cmake/CPM.cmake
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,13 +2,10 @@ if (TARGET geometry-central)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(FetchContent)
|
include(CPM)
|
||||||
|
|
||||||
message(STATUS "Fetching geometry-central")
|
CPMAddPackage(
|
||||||
|
NAME geometry-central
|
||||||
FetchContent_Declare(
|
GIT_TAG 70c859ec3b58fe597c0063673a74082654e9c5aa
|
||||||
geometry-central
|
GITHUB_REPOSITORY "nmwsharp/geometry-central"
|
||||||
GIT_REPOSITORY https://github.com/nmwsharp/geometry-central.git
|
)
|
||||||
GIT_SHALLOW TRUE
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(geometry-central)
|
|
||||||
|
@ -2,14 +2,15 @@ if (TARGET polyscope)
|
|||||||
return()
|
return()
|
||||||
endif()
|
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(
|
CPMAddPackage(
|
||||||
polyscope
|
NAME polyscope
|
||||||
GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
|
VERSION 2.3.0
|
||||||
GIT_TAG v1.2.0
|
GITHUB_REPOSITORY "nmwsharp/polyscope"
|
||||||
GIT_SHALLOW TRUE
|
)
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(polyscope)
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_OLD}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user