1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-03 07:30:53 +02:00

Modernize cmake project files

Fix install target

Update cmake-format config file

Format all cmake files.

Update CPM.cmake version.

Use FILE_SET HEADER to verify and install the header files.

Prevent build problems caused by CPM_USE_LOCAL_PACKAGES

Prevent problems with doctest if local found
This commit is contained in:
ClausKlein 2025-03-06 07:00:40 +01:00
parent 5115efe66a
commit a3bc933175
14 changed files with 441 additions and 32 deletions

View file

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14...3.22)
cmake_minimum_required(VERSION 3.24...3.31)
project(GreeterStandalone LANGUAGES CXX)
@ -12,11 +12,15 @@ include(../cmake/CPM.cmake)
CPMAddPackage(
GITHUB_REPOSITORY jarro2783/cxxopts
VERSION 3.0.0
VERSION 3.2.1
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
)
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
CPMAddPackage(
NAME Greeter
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..
FORCE ON
)
# ---- Create standalone executable ----