Skip to content

Commit a0d0ed6

Browse files
committed
build: ignore warning in generated code
Ignore `unused-but-set-variable` as an error in generated code which now is triggered on MinGW64.
1 parent e93f823 commit a0d0ed6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tools/JSObjects/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ target_include_directories(jsobjects
5454
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
5555
(CMAKE_CXX_COMPILER_ID MATCHES "Clang"
5656
AND NOT CMAKE_CXX_SIMULATE_ID MATCHES "MSVC"))
57+
set_source_files_properties(${JSObjects_BINARY_DIR}/parser.c PROPERTIES
58+
COMPILE_FLAGS -Wno-error=unused-but-set-variable)
5759
target_compile_options(jsobjects PRIVATE -Wall -Wextra -Werror)
5860
target_compile_options(jsobjects PRIVATE -Wno-unused-parameter
5961
-Wno-unused-function

0 commit comments

Comments
 (0)