Skip to content

Commit 27c17d6

Browse files
authored
update CPM.cmake and use new shorthand syntax (#87)
1 parent 573663d commit 27c17d6

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,13 @@ endif()
2424
include(cmake/CPM.cmake)
2525

2626
# PackageProject.cmake will be used to make our target installable
27-
CPMAddPackage(
28-
NAME PackageProject.cmake
29-
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
30-
VERSION 1.5.0
31-
)
27+
CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.4.1")
3228

3329
CPMAddPackage(
3430
NAME fmt
3531
GIT_TAG 7.1.3
36-
GITHUB_REPOSITORY fmtlib/fmt # to get an installable target
37-
OPTIONS "FMT_INSTALL YES"
32+
GITHUB_REPOSITORY fmtlib/fmt
33+
OPTIONS "FMT_INSTALL YES" # create an installable target
3834
)
3935

4036
# ---- Add source files ----

cmake/CPM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(CPM_DOWNLOAD_VERSION 0.28.4)
1+
set(CPM_DOWNLOAD_VERSION 0.31.0)
22

33
if(CPM_SOURCE_CACHE)
44
# Expand relative path. This is important if the provided path contains a tilde (~)

standalone/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ include(../cmake/tools.cmake)
1010

1111
include(../cmake/CPM.cmake)
1212

13-
CPMAddPackage(
14-
NAME cxxopts
15-
GITHUB_REPOSITORY jarro2783/cxxopts
16-
VERSION 2.2.0
17-
OPTIONS "CXXOPTS_BUILD_EXAMPLES Off" "CXXOPTS_BUILD_TESTS Off"
18-
)
13+
CPMAddPackage("gh:jarro2783/cxxopts@2.2.0")
1914

2015
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
2116

test/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ include(../cmake/tools.cmake)
1515

1616
include(../cmake/CPM.cmake)
1717

18-
CPMAddPackage(
19-
NAME doctest
20-
GITHUB_REPOSITORY onqtam/doctest
21-
GIT_TAG 2.4.5
22-
)
18+
CPMAddPackage("gh:onqtam/doctest#2.4.5")
2319

2420
if(TEST_INSTALLED_VERSION)
2521
find_package(Greeter REQUIRED)

0 commit comments

Comments
 (0)