addition: automatic cpm download
This commit is contained in:
@@ -11,6 +11,28 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
option(GRAPH_BUILD_TESTS "Build arraylist tests" OFF)
|
||||
option(GRAPH_ENABLE_SANITIZERS "Enable sanitizers for tests" ON)
|
||||
|
||||
# --------------------------------------------------
|
||||
# CPM.cmake bootstrap
|
||||
# --------------------------------------------------
|
||||
|
||||
set(CPM_DOWNLOAD_VERSION 0.40.2)
|
||||
|
||||
set(CPM_DOWNLOAD_LOCATION
|
||||
"${CMAKE_BINARY_DIR}/cmake/CPM.cmake"
|
||||
)
|
||||
|
||||
if(NOT EXISTS ${CPM_DOWNLOAD_LOCATION})
|
||||
message(STATUS "Downloading CPM.cmake...")
|
||||
|
||||
file(
|
||||
DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
||||
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage(
|
||||
|
||||
Reference in New Issue
Block a user