diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-06-06 11:21:23 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 11:21:23 -0700 |
| commit | fa664d1419659e3c56db823c60f2b9cc088455cd (patch) | |
| tree | 26cbe8f09e0d30317889b7f9a2498670cf93d9e6 /source/slang/CMakeLists.txt | |
| parent | f1490526be567059a8e4b98aa41eef698065aee1 (diff) | |
Fix build warnings and treat warnings as error on CI (#4276)
* Fix build warnings and treat warnings as error
Diffstat (limited to 'source/slang/CMakeLists.txt')
| -rw-r--r-- | source/slang/CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/slang/CMakeLists.txt b/source/slang/CMakeLists.txt index 7b51dee2d..d708bde1e 100644 --- a/source/slang/CMakeLists.txt +++ b/source/slang/CMakeLists.txt @@ -271,9 +271,10 @@ slang_add_target( PUBLIC_HEADERS ${slang_SOURCE_DIR}/slang*.h ) -if(MSVC) - # Treat warnings as error - target_compile_options(slang PRIVATE /WX) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # a warning is disabled for a memset boundary check. + # everything looked fine and it is unclear why the checking fails + target_compile_options(slang PRIVATE -Wno-error=stringop-overflow) endif() if(SLANG_EMBED_STDLIB_SOURCE) |
