mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 10:11:34 +01:00 
			
		
		
		
	make it useable for me
extent cmake-format config file use package-lock too
This commit is contained in:
		
							parent
							
								
									d4c654f026
								
							
						
					
					
						commit
						47fa7c6933
					
				
					 14 changed files with 225 additions and 29 deletions
				
			
		
							
								
								
									
										27
									
								
								GNUmakefile
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								GNUmakefile
									
										
									
									
									
								
							|  | @ -7,25 +7,23 @@ GENERATOR=Ninja | |||
| export CPM_SOURCE_CACHE=${HOME}/.cache/CPM | ||||
| export CPM_USE_LOCAL_PACKAGES=1 | ||||
| 
 | ||||
| .PHONY: update format all test check clean distclean lock | ||||
| .PHONY: update format all test standalone check clean distclean lock | ||||
| 
 | ||||
| # the default target does just all | ||||
| check: all | ||||
| all: | ||||
| 
 | ||||
| all: test | ||||
| 
 | ||||
| test: install | ||||
| 
 | ||||
| 
 | ||||
| distclean: | ||||
| distclean: clean | ||||
| 	rm -rf build root | ||||
| 
 | ||||
| # update CPM.cmake | ||||
| update: | ||||
| 	wget -q -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/get_cpm.cmake | ||||
| 
 | ||||
| lock: install | ||||
| lock: standalone all | ||||
| 	cmake --build build/all --target cpm-update-package-lock | ||||
| 	cmake --build build/test --target cpm-update-package-lock | ||||
| 	cmake --build build/install --target cpm-update-package-lock | ||||
| 	cmake --build build/standalone --target cpm-update-package-lock | ||||
| 
 | ||||
| # install the library | ||||
| install: | ||||
|  | @ -33,13 +31,13 @@ install: | |||
| 	cmake --build build/install --target install | ||||
| 
 | ||||
| # test the library | ||||
| test: | ||||
| test: install | ||||
| 	cmake -S test -B build/test -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${CURDIR}/root -DTEST_INSTALLED_VERSION=1 | ||||
| 	cmake --build build/test | ||||
| 	cmake --build build/test --target test | ||||
| 
 | ||||
| # all together | ||||
| all: | ||||
| all: test | ||||
| 	cmake -S all -B build/all -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${CURDIR}/root -DTEST_INSTALLED_VERSION=1 -DENABLE_TEST_COVERAGE=1 | ||||
| 	cmake --build build/all | ||||
| 	cmake --build build/all --target test | ||||
|  | @ -48,11 +46,14 @@ all: | |||
| 
 | ||||
| format: distclean | ||||
| 	find . -name CMakeLists.txt | xargs cmake-format -i | ||||
| 	find . -name '*.cmake' | xargs cmake-format -i | ||||
| 	find . -name '*.cpp' | xargs clang-format -i | ||||
| 	find . -name '*.h' | xargs clang-format -i | ||||
| 
 | ||||
| # check the library | ||||
| check: | ||||
| standalone: | ||||
| 	cmake -S standalone -B build/standalone -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${CURDIR}/root -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | ||||
| 	cmake --build build/standalone --target all | ||||
| 
 | ||||
| # check the library | ||||
| check: standalone | ||||
| 	run-clang-tidy.py -p build/standalone -checks='-*,modernize-*,misc-*,hicpp-*,cert-*,readability-*,portability-*,performance-*,google-*' standalone | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue