Skip to content

Commit c27d80e

Browse files
authored
CMake: actually apply -Wno-format-truncation. (#744)
The check added in 376fecc incorrectly added the warning to the list of warnings to check, and not to the list of warnings used.
1 parent b33f198 commit c27d80e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prboom2/cmake/DsdaTargetFeatures.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ function(dsda_internal_setup_warnings_gnu result_var)
3030
-Wdeclaration-after-statement
3131
-Wbad-function-cast
3232
)
33-
set(GNU_WARNINGS_SET ${GNU_WARNINGS} ${GNU_C_WARNINGS})
34-
3533
if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
3634
OR (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 18)
3735
OR (CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 17)
3836
)
39-
list(APPEND GNU_WARNINGS_SET "-Wno-format-truncation")
37+
list(APPEND GNU_WARNINGS "-Wno-format-truncation")
4038
endif()
4139

40+
set(GNU_WARNINGS_SET ${GNU_WARNINGS} ${GNU_C_WARNINGS})
41+
4242
include(CheckCCompilerFlag)
4343
check_c_compiler_flag("${GNU_WARNINGS_SET}" DSDA_SUPPORTS_GNU_WARNINGS)
4444

0 commit comments

Comments
 (0)