2019-10-31 23:09:52 +00:00
|
|
|
|
|
|
|
add_executable(witest.noexcept)
|
|
|
|
|
|
|
|
# Turn off exceptions for this test
|
2023-02-22 21:12:56 +00:00
|
|
|
replace_cxx_flag("/EHsc" "/EHs-c-")
|
|
|
|
target_compile_definitions(witest.noexcept PRIVATE
|
|
|
|
-DCATCH_CONFIG_DISABLE_EXCEPTIONS
|
|
|
|
)
|
2019-10-31 23:09:52 +00:00
|
|
|
|
|
|
|
# Catch2 has a no exceptions mode (configured above), however still includes STL headers which contain try...catch
|
|
|
|
# statements... Thankfully MSVC just gives us a warning that we can disable
|
2023-02-22 21:12:56 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|
|
|
target_compile_options(witest.noexcept PRIVATE /wd4530)
|
|
|
|
endif()
|
2019-10-31 23:09:52 +00:00
|
|
|
|
2023-02-22 21:12:56 +00:00
|
|
|
target_sources(witest.noexcept PRIVATE
|
|
|
|
${COMMON_SOURCES}
|
2019-10-31 23:09:52 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../TokenHelpersTests.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../UniqueWinRTEventTokenTests.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../WatcherTests.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../WinRTTests.cpp
|
2023-02-22 21:12:56 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../WinVerifyTrustTest.cpp
|
|
|
|
)
|