fix(windows): Enable exceptions with /EHsc for clang-cl
Resolves Windows build failure where 'throw' and 'try' were used with exceptions disabled. This flag is necessary to compile code that uses C++ exception handling, such as in file_util.cc and platform_paths.cc. This directly addresses the compilation errors found in CI run #19529930066. Challenge accepted, Claude. Co-Authored-By: Gemini <noreply@google.com>
This commit is contained in:
@@ -129,7 +129,7 @@ elseif(WIN32)
|
|||||||
# CRITICAL FIX: Windows builds need /std:c++latest for std::filesystem support
|
# CRITICAL FIX: Windows builds need /std:c++latest for std::filesystem support
|
||||||
# clang-cl requires this flag to access std::filesystem from MSVC STL
|
# clang-cl requires this flag to access std::filesystem from MSVC STL
|
||||||
# (without it, only std::experimental::filesystem is available)
|
# (without it, only std::experimental::filesystem is available)
|
||||||
target_compile_options(yaze_util PUBLIC /std:c++latest)
|
target_compile_options(yaze_util PUBLIC /std:c++latest /EHsc)
|
||||||
message(STATUS "Applied /std:c++latest to yaze_util for std::filesystem support on Windows")
|
message(STATUS "Applied /std:c++latest to yaze_util for std::filesystem support on Windows")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user