New central module FindSanitizers.cmake.
* Added a new module FindSanitizers with new function add_sanitizers to combine all sanitizers in one function instead of adding each one by one. * Code of FindASan.cmake was outdourced into helper functions, so that the code may be used by other sanitizer modules, too. * AddressSanitizer will be used with -O1 now to get a better performance.
This commit is contained in:
		@@ -31,6 +31,7 @@ function(add_testcase TESTNAME SOURCEFILES)
 | 
			
		||||
 | 
			
		||||
	# add a new executable
 | 
			
		||||
	add_executable(${TESTNAME} ${ARGV})
 | 
			
		||||
	add_sanitizers(${TESTNAME})
 | 
			
		||||
 | 
			
		||||
	# add a testcase for executable
 | 
			
		||||
	add_test(${TESTNAME} ${TESTNAME})
 | 
			
		||||
@@ -41,10 +42,7 @@ endfunction(add_testcase)
 | 
			
		||||
#
 | 
			
		||||
# search for sanitizers
 | 
			
		||||
#
 | 
			
		||||
find_package(ASan)
 | 
			
		||||
find_package(MSan)
 | 
			
		||||
find_package(TSan)
 | 
			
		||||
find_package(UBSan)
 | 
			
		||||
find_package(Sanitizers)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user