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