mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Cleanly override warning level for SelfTest in MSVC
Eliminates warning about warning level override (by removing the default /W3)
This commit is contained in:
		| @@ -317,7 +317,8 @@ if (NOT NO_SELFTEST) | ||||
|         target_compile_options( SelfTest PRIVATE -Wweak-vtables -Wexit-time-destructors -Wglobal-constructors -Wmissing-noreturn ) | ||||
|     endif() | ||||
|     if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) | ||||
|         target_compile_options( SelfTest PRIVATE /W4 /w44265 /WX /w44061 /w44062 ) | ||||
| 		STRING(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # override default warning level | ||||
|         target_compile_options( SelfTest PRIVATE /w44265 /WX /w44061 /w44062 ) | ||||
|     endif() | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 philsquared
					philsquared