1 2foreach(num RANGE 1 9) 3 list(APPEND SOURCE seh000${num}.c) 4 set_source_files_properties(seh000${num}.c PROPERTIES COMPILE_DEFINITIONS 5 "main=seh000${num};test=test_${num};Echo=Echo_${num};dojump=dojump_${num};AccessViolation=AccessViolation_${num};rtlRaiseExceptin=rtlRaiseExceptin_${num};rtlRaiseException=rtlRaiseException_${num};rtlRaiseStatus=rtlRaiseStatus_${num}") 6endforeach() 7 8foreach(num RANGE 10 58) 9 list(APPEND SOURCE seh00${num}.c) 10 set_source_files_properties(seh00${num}.c PROPERTIES COMPILE_DEFINITIONS 11 "main=seh00${num};test=test_${num};Echo=Echo_${num};dojump=dojump_${num};AccessViolation=AccessViolation_${num};rtlRaiseExceptin=rtlRaiseExceptin_${num};rtlRaiseException=rtlRaiseException_${num};rtlRaiseStatus=rtlRaiseStatus_${num}") 12endforeach() 13 14add_library(ms_seh_test ${SOURCE}) 15add_dependencies(ms_seh_test psdk) 16 17if(MSVC) 18 # error C4189: 'Index2': local variable is initialized but not referenced 19 # warning C4197: 'volatile LONG': top-level volatile in cast is ignored 20 # warning C4532: 'break': jump out of __finally block has undefined behavior during termination handling 21 remove_target_compile_option(ms_seh_test "/we4189") 22 target_compile_options(ms_seh_test PRIVATE /wd4189 /wd4197 /wd4532) 23else() 24 target_compile_options(ms_seh_test 25 PRIVATE -Wno-format -Wno-implicit-function-declaration -Wno-unused-label -Wno-unused-variable) 26endif() 27