mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 13:41:13 +02:00
update CPM.cmake and use new shorthand syntax (#87)
This commit is contained in:
parent
573663dc15
commit
27c17d63cf
4 changed files with 6 additions and 19 deletions
|
@ -24,17 +24,13 @@ endif()
|
||||||
include(cmake/CPM.cmake)
|
include(cmake/CPM.cmake)
|
||||||
|
|
||||||
# PackageProject.cmake will be used to make our target installable
|
# PackageProject.cmake will be used to make our target installable
|
||||||
CPMAddPackage(
|
CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.4.1")
|
||||||
NAME PackageProject.cmake
|
|
||||||
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
|
|
||||||
VERSION 1.5.0
|
|
||||||
)
|
|
||||||
|
|
||||||
CPMAddPackage(
|
CPMAddPackage(
|
||||||
NAME fmt
|
NAME fmt
|
||||||
GIT_TAG 7.1.3
|
GIT_TAG 7.1.3
|
||||||
GITHUB_REPOSITORY fmtlib/fmt # to get an installable target
|
GITHUB_REPOSITORY fmtlib/fmt
|
||||||
OPTIONS "FMT_INSTALL YES"
|
OPTIONS "FMT_INSTALL YES" # create an installable target
|
||||||
)
|
)
|
||||||
|
|
||||||
# ---- Add source files ----
|
# ---- Add source files ----
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
set(CPM_DOWNLOAD_VERSION 0.28.4)
|
set(CPM_DOWNLOAD_VERSION 0.31.0)
|
||||||
|
|
||||||
if(CPM_SOURCE_CACHE)
|
if(CPM_SOURCE_CACHE)
|
||||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||||
|
|
|
@ -10,12 +10,7 @@ include(../cmake/tools.cmake)
|
||||||
|
|
||||||
include(../cmake/CPM.cmake)
|
include(../cmake/CPM.cmake)
|
||||||
|
|
||||||
CPMAddPackage(
|
CPMAddPackage("gh:jarro2783/cxxopts@2.2.0")
|
||||||
NAME cxxopts
|
|
||||||
GITHUB_REPOSITORY jarro2783/cxxopts
|
|
||||||
VERSION 2.2.0
|
|
||||||
OPTIONS "CXXOPTS_BUILD_EXAMPLES Off" "CXXOPTS_BUILD_TESTS Off"
|
|
||||||
)
|
|
||||||
|
|
||||||
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,7 @@ include(../cmake/tools.cmake)
|
||||||
|
|
||||||
include(../cmake/CPM.cmake)
|
include(../cmake/CPM.cmake)
|
||||||
|
|
||||||
CPMAddPackage(
|
CPMAddPackage("gh:onqtam/doctest#2.4.5")
|
||||||
NAME doctest
|
|
||||||
GITHUB_REPOSITORY onqtam/doctest
|
|
||||||
GIT_TAG 2.4.5
|
|
||||||
)
|
|
||||||
|
|
||||||
if(TEST_INSTALLED_VERSION)
|
if(TEST_INSTALLED_VERSION)
|
||||||
find_package(Greeter REQUIRED)
|
find_package(Greeter REQUIRED)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue