1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

fix merge problems

prevent testing the cxxopts lib
This commit is contained in:
ClausKlein 2021-02-27 12:53:02 +01:00
parent 9d1c7413f0
commit 1b3755e6e5
5 changed files with 7 additions and 8 deletions

View file

@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.14...3.19)
# Note: update this to your new project's name and version
project(
Greeter
VERSION 1.0.1
VERSION 1.0
LANGUAGES CXX
)
@ -58,8 +58,8 @@ set_target_properties(Greeter PROPERTIES SOVERSION 1 VERSION ${PROJECT_VERSION})
# being a cross-platform target, we enforce standards conformance on MSVC
target_compile_options(Greeter PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive>")
# Link dependencies
target_link_libraries(Greeter PUBLIC fmt::fmt)
# Link dependencies, but Note: the fmt lib does not work with SHARED yet! CK
target_link_libraries(Greeter PUBLIC fmt::fmt-header-only)
set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION})
target_include_directories(
@ -80,8 +80,8 @@ include(GenerateExportHeader)
generate_export_header(
${PROJECT_NAME} EXPORT_FILE_NAME PackageProjectInclude/${EXPORT_HEADER_LOCATION}
)
# Note: the export header will be installed while installing the version header! CK
# Note: the export header will be installed while installing the version header! CK
packageProject(
NAME ${PROJECT_NAME}
VERSION ${PROJECT_VERSION}

View file

@ -12,4 +12,4 @@ enable_testing()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../standalone standalone)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../test test)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation documentation)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation documentation)

View file

@ -7,8 +7,6 @@ if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
CPMUsePackageLock(package-lock.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/options.cmake)
# option: default not set

View file

@ -11,6 +11,7 @@ include(../cmake/tools.cmake)
include(../cmake/CPM.cmake)
CPMUsePackageLock(package-lock.cmake)
option(CXXOPTS_BUILD_TESTS "Not needed!" OFF)
CPMAddPackage("gh:jarro2783/cxxopts@2.2.0")
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)

View file

@ -42,7 +42,7 @@ file(GLOB sources CONFIGURE_DEPENDS source/*.cpp)
add_executable(GreeterTests ${sources})
target_link_libraries(GreeterTests doctest::doctest Greeter::Greeter)
set_target_properties(GreeterTests PROPERTIES CXX_STANDARD 17)
set_target_properties(GreeterTests PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD})
# enable compiler warnings
if(NOT TEST_INSTALLED_VERSION)