mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	check with clang-tidy only local source
cleanup GNUmakefile, add some Notes too
This commit is contained in:
		
							parent
							
								
									7d95486a55
								
							
						
					
					
						commit
						45f48abb0c
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		
							
								
								
									
										14
									
								
								GNUmakefile
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								GNUmakefile
									
										
									
									
									
								
							|  | @ -20,7 +20,7 @@ clean: | ||||||
| 	find . -type d -name build | xargs rm -rf | 	find . -type d -name build | xargs rm -rf | ||||||
| 
 | 
 | ||||||
| distclean: clean | distclean: clean | ||||||
| 	rm -rf build ${ROOT} | 	rm -rf build ${STAGEDIR} | ||||||
| 
 | 
 | ||||||
| # update CPM.cmake | # update CPM.cmake | ||||||
| update: | update: | ||||||
|  | @ -37,21 +37,22 @@ lock: all standalone doc | ||||||
| install: | install: | ||||||
| 	cmake -S . -B build/$@ ${CMAKE_PRESET} -DCMAKE_INSTALL_PREFIX=${STAGEDIR} -DCMAKE_CXX_STANDARD=20 #NO! -DCMAKE_CXX_CLANG_TIDY=clang-tidy # --trace-expand | 	cmake -S . -B build/$@ ${CMAKE_PRESET} -DCMAKE_INSTALL_PREFIX=${STAGEDIR} -DCMAKE_CXX_STANDARD=20 #NO! -DCMAKE_CXX_CLANG_TIDY=clang-tidy # --trace-expand | ||||||
| 	cmake --build build/$@ --target $@ | 	cmake --build build/$@ --target $@ | ||||||
| 	perl -i.bak -pe 's#-I($$CPM_SOURCE_CACHE)#-isystem $$1#g' build/install/compile_commands.json | 	perl -i.bak -pe 's#-I($$CPM_SOURCE_CACHE)#-isystem $$1#g' build/$@/compile_commands.json | ||||||
| 	run-clang-tidy.py -p build/$@ source | 	run-clang-tidy.py -p build/$@ source    # Note: only local sources! CK | ||||||
| 
 | 
 | ||||||
| # test the library | # test the library | ||||||
| test: install | test: install | ||||||
| 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} -DTEST_INSTALLED_VERSION=1 | 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} -DTEST_INSTALLED_VERSION=1 | ||||||
|  | 	perl -i.bak -pe 's#-I($$CPM_SOURCE_CACHE)#-isystem $$1#g' build/$@/compile_commands.json | ||||||
| 	cmake --build build/$@ | 	cmake --build build/$@ | ||||||
| 	cmake --build build/$@ --target $@ | 	cmake --build build/$@ --target $@ | ||||||
|  | 	run-clang-tidy.py -p build/$@ test/source    # Note: only local sources! CK | ||||||
| 
 | 
 | ||||||
| # all together | # all together | ||||||
| all: #XXX test | all: format | ||||||
| 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} -DENABLE_TEST_COVERAGE=1 -DUSE_STATIC_ANALYZER=clang-tidy | 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} -DENABLE_TEST_COVERAGE=1 # Note: NO! -DUSE_STATIC_ANALYZER=clang-tidy CK | ||||||
| 	cmake --build build/$@ | 	cmake --build build/$@ | ||||||
| 	cmake --build build/$@ --target test | 	cmake --build build/$@ --target test | ||||||
| 	#XXX cmake --build build/$@ --target check-format |  | ||||||
| 
 | 
 | ||||||
| # GenerateDocs | # GenerateDocs | ||||||
| doc: | doc: | ||||||
|  | @ -66,6 +67,7 @@ format: distclean | ||||||
| 
 | 
 | ||||||
| standalone: | standalone: | ||||||
| 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} | 	cmake -S $@ -B build/$@ ${CMAKE_PRESET} | ||||||
|  | 	perl -i.bak -pe 's#-I($$CPM_SOURCE_CACHE)#-isystem $$1#g' build/$@/compile_commands.json | ||||||
| 	cmake --build build/$@ | 	cmake --build build/$@ | ||||||
| 
 | 
 | ||||||
| # check the library | # check the library | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue