Skip to content

Commit

Permalink
update CPM.cmake and use new shorthand syntax (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLartians authored Feb 22, 2021
1 parent 573663d commit 27c17d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]")

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 ----
Expand Down
2 changes: 1 addition & 1 deletion cmake/CPM.cmake
Original file line number Diff line number Diff line change
@@ -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 (~)
Expand Down
7 changes: 1 addition & 6 deletions standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]")

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

Expand Down
6 changes: 1 addition & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 27c17d6

Please sign in to comment.