mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	fix merge problems
prevent testing the cxxopts lib
This commit is contained in:
		
							parent
							
								
									9d1c7413f0
								
							
						
					
					
						commit
						1b3755e6e5
					
				
					 5 changed files with 7 additions and 8 deletions
				
			
		|  | @ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.14...3.19) | ||||||
| # Note: update this to your new project's name and version | # Note: update this to your new project's name and version | ||||||
| project( | project( | ||||||
|   Greeter |   Greeter | ||||||
|   VERSION 1.0.1 |   VERSION 1.0 | ||||||
|   LANGUAGES CXX |   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 | # being a cross-platform target, we enforce standards conformance on MSVC | ||||||
| target_compile_options(Greeter PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive>") | target_compile_options(Greeter PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive>") | ||||||
| 
 | 
 | ||||||
| # Link dependencies | # Link dependencies, but Note: the fmt lib does not work with SHARED yet! CK | ||||||
| target_link_libraries(Greeter PUBLIC fmt::fmt) | target_link_libraries(Greeter PUBLIC fmt::fmt-header-only) | ||||||
| 
 | 
 | ||||||
| set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) | set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) | ||||||
| target_include_directories( | target_include_directories( | ||||||
|  | @ -80,8 +80,8 @@ include(GenerateExportHeader) | ||||||
| generate_export_header( | generate_export_header( | ||||||
|   ${PROJECT_NAME} EXPORT_FILE_NAME PackageProjectInclude/${EXPORT_HEADER_LOCATION} |   ${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( | packageProject( | ||||||
|   NAME ${PROJECT_NAME} |   NAME ${PROJECT_NAME} | ||||||
|   VERSION ${PROJECT_VERSION} |   VERSION ${PROJECT_VERSION} | ||||||
|  |  | ||||||
|  | @ -7,8 +7,6 @@ if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) | ||||||
| endif() | endif() | ||||||
| 
 | 
 | ||||||
| include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) | include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) | ||||||
| CPMUsePackageLock(package-lock.cmake) |  | ||||||
| 
 |  | ||||||
| include(${CMAKE_CURRENT_LIST_DIR}/options.cmake) | include(${CMAKE_CURRENT_LIST_DIR}/options.cmake) | ||||||
| 
 | 
 | ||||||
| # option: default not set | # option: default not set | ||||||
|  |  | ||||||
|  | @ -11,6 +11,7 @@ include(../cmake/tools.cmake) | ||||||
| include(../cmake/CPM.cmake) | include(../cmake/CPM.cmake) | ||||||
| CPMUsePackageLock(package-lock.cmake) | CPMUsePackageLock(package-lock.cmake) | ||||||
| 
 | 
 | ||||||
|  | option(CXXOPTS_BUILD_TESTS "Not needed!" OFF) | ||||||
| CPMAddPackage("gh:jarro2783/cxxopts@2.2.0") | CPMAddPackage("gh:jarro2783/cxxopts@2.2.0") | ||||||
| 
 | 
 | ||||||
| CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) | CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) | ||||||
|  |  | ||||||
|  | @ -42,7 +42,7 @@ file(GLOB sources CONFIGURE_DEPENDS source/*.cpp) | ||||||
| add_executable(GreeterTests ${sources}) | add_executable(GreeterTests ${sources}) | ||||||
| target_link_libraries(GreeterTests doctest::doctest Greeter::Greeter) | 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 | # enable compiler warnings | ||||||
| if(NOT TEST_INSTALLED_VERSION) | if(NOT TEST_INSTALLED_VERSION) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue