mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	prevent to test fetcht packeage too
use only explicit add_test()
This commit is contained in:
		
							parent
							
								
									e8d1012d41
								
							
						
					
					
						commit
						75c10df2d8
					
				
					 3 changed files with 11 additions and 7 deletions
				
			
		|  | @ -64,8 +64,9 @@ set_target_properties( | ||||||
| # 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 Note Either: target_link_libraries(Greeter PUBLIC | # Link dependencies Note: | ||||||
| # $<BUILD_INTERFACE:fmt::fmt-header-only>) Or: | 
 | ||||||
|  | # Either: target_link_libraries(Greeter PUBLIC $<BUILD_INTERFACE:fmt::fmt-header-only>) Or: | ||||||
| target_link_libraries(Greeter PUBLIC fmt::fmt) | target_link_libraries(Greeter PUBLIC fmt::fmt) | ||||||
| 
 | 
 | ||||||
| set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) | set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) | ||||||
|  |  | ||||||
|  | @ -44,10 +44,11 @@ test: install | ||||||
| 
 | 
 | ||||||
| # all together | # all together | ||||||
| all: test | all: test | ||||||
| 	cmake -S $@ -B build/$@ -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${ROOT} -DTEST_INSTALLED_VERSION=1 -DENABLE_TEST_COVERAGE=1 -DUSE_STATIC_ANALYZER=clang-tidy | 	cmake -S $@ -B build/$@ -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${ROOT} -DTEST_INSTALLED_VERSION=1 -DENABLE_TEST_COVERAGE=1  -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DUSE_STATIC_ANALYZER=clang-tidy | ||||||
| 	cmake --build build/$@ | 	cmake --build build/$@ | ||||||
| 	cmake --build build/$@ --target test | 	cmake --build build/$@ --target test | ||||||
| 	cmake --build build/$@ --target check-format | 	# cmake --build build/$@ --target check-format | ||||||
|  | 	# TODO builddriver run-clang-tidy.py -p build/$@ -checks='-*,modernize-*,misc-*,hicpp-*,cert-*,readability-*,portability-*,performance-*,google-*' | ||||||
| 
 | 
 | ||||||
| # GenerateDocs | # GenerateDocs | ||||||
| doc: | doc: | ||||||
|  |  | ||||||
|  | @ -59,10 +59,12 @@ endif() | ||||||
| enable_testing() | enable_testing() | ||||||
| 
 | 
 | ||||||
| # Note: doctest and similar testing frameworks can automatically configure CMake tests. For other | # Note: doctest and similar testing frameworks can automatically configure CMake tests. For other | ||||||
| # testing frameworks add the tests target instead: add_test(NAME greeterTests COMMAND GreeterTests) | # testing frameworks add the tests target instead: | ||||||
|  | add_test(NAME greeterTests COMMAND GreeterTests) | ||||||
| 
 | 
 | ||||||
| include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) | # include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) | ||||||
| doctest_discover_tests(GreeterTests) | 
 | ||||||
|  | # doctest_discover_tests(GreeterTests) | ||||||
| 
 | 
 | ||||||
| # ---- code coverage ---- | # ---- code coverage ---- | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue