From 27c17d63cf16a0d0d1f5b19649ff6a40b1204ae3 Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Mon, 22 Feb 2021 21:55:02 +0100 Subject: [PATCH] update CPM.cmake and use new shorthand syntax (#87) --- CMakeLists.txt | 10 +++------- cmake/CPM.cmake | 2 +- standalone/CMakeLists.txt | 7 +------ test/CMakeLists.txt | 6 +----- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b45ae4..264b563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,17 +24,13 @@ endif() include(cmake/CPM.cmake) # PackageProject.cmake will be used to make our target installable -CPMAddPackage( - NAME PackageProject.cmake - GITHUB_REPOSITORY TheLartians/PackageProject.cmake - VERSION 1.5.0 -) +CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.4.1") CPMAddPackage( NAME fmt GIT_TAG 7.1.3 - GITHUB_REPOSITORY fmtlib/fmt # to get an installable target - OPTIONS "FMT_INSTALL YES" + GITHUB_REPOSITORY fmtlib/fmt + OPTIONS "FMT_INSTALL YES" # create an installable target ) # ---- Add source files ---- diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index 73ee2d0..291e30e 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -1,4 +1,4 @@ -set(CPM_DOWNLOAD_VERSION 0.28.4) +set(CPM_DOWNLOAD_VERSION 0.31.0) if(CPM_SOURCE_CACHE) # Expand relative path. This is important if the provided path contains a tilde (~) diff --git a/standalone/CMakeLists.txt b/standalone/CMakeLists.txt index 4bb837d..ae575d9 100644 --- a/standalone/CMakeLists.txt +++ b/standalone/CMakeLists.txt @@ -10,12 +10,7 @@ include(../cmake/tools.cmake) include(../cmake/CPM.cmake) -CPMAddPackage( - NAME cxxopts - GITHUB_REPOSITORY jarro2783/cxxopts - VERSION 2.2.0 - OPTIONS "CXXOPTS_BUILD_EXAMPLES Off" "CXXOPTS_BUILD_TESTS Off" -) +CPMAddPackage("gh:jarro2783/cxxopts@2.2.0") CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a54ecc3..e22e2dd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,11 +15,7 @@ include(../cmake/tools.cmake) include(../cmake/CPM.cmake) -CPMAddPackage( - NAME doctest - GITHUB_REPOSITORY onqtam/doctest - GIT_TAG 2.4.5 -) +CPMAddPackage("gh:onqtam/doctest#2.4.5") if(TEST_INSTALLED_VERSION) find_package(Greeter REQUIRED)