summaryrefslogtreecommitdiffstats
path: root/cmake/SlangTarget.cmake
diff options
context:
space:
mode:
authorcheneym2 <acheney@nvidia.com>2024-11-05 17:28:36 -0500
committerGitHub <noreply@github.com>2024-11-05 17:28:36 -0500
commit4fa76f374c0c35c9c7d186e8addf6861e98baaec (patch)
tree0712545f51f15e62b70e89448e251f7d4df19406 /cmake/SlangTarget.cmake
parente22c0b72b8bedb330d8b20e488f6898f6c484187 (diff)
Catch all exceptions in render-test (#5495)
Catch all exceptions in render-test In MSVC, the /EHsc flag is used by default, it causes only C++ (synchronous) exceptions to be caught by try/catch blocks. The /EHa flag can instead be used to catch both synchronous C++ exceptions as well as structured asynchronous exceptions such as those seen in segfaults or other typical bugs. Using /EHa allows render-test to not crash completely if there is a buggy graphics driver in the system. Issue 5275
Diffstat (limited to 'cmake/SlangTarget.cmake')
-rw-r--r--cmake/SlangTarget.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/SlangTarget.cmake b/cmake/SlangTarget.cmake
index 4a3b75704..98517a1ba 100644
--- a/cmake/SlangTarget.cmake
+++ b/cmake/SlangTarget.cmake
@@ -337,9 +337,10 @@ function(slang_add_target dir type)
)
endif()
if(ARG_EXTRA_COMPILE_OPTIONS_PRIVATE)
- target_compile_options(
+ add_supported_cxx_flags(
${target}
- PRIVATE ${ARG_EXTRA_COMPILE_OPTIONS_PRIVATE}
+ PRIVATE
+ ${ARG_EXTRA_COMPILE_OPTIONS_PRIVATE}
)
endif()