Skip to content

Commit bc83700

Browse files
[CMAKE] gcc: Allow warnings on CMAKE_BUILD_TYPE=MinSizeRel too (reactos#8332)
- Skip -Werror - Also merge amd64 case Follow-up to 0.4.16-dev-848-g 6c7d2a2.
1 parent 15c9005 commit bc83700

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sdk/cmake/gcc.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ endif()
168168
add_compile_options(-march=${OARCH} -mtune=${TUNE})
169169

170170
# Warnings, errors
171-
if((NOT CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") AND (NOT CMAKE_C_COMPILER_ID STREQUAL Clang))
171+
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
172+
NOT ARCH STREQUAL "amd64" AND
173+
NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND
174+
NOT CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND
175+
NOT CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
172176
add_compile_options(-Werror)
173177
endif()
174178

@@ -249,7 +253,6 @@ elseif(ARCH STREQUAL "amd64")
249253
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
250254
add_compile_options(-mpreferred-stack-boundary=4)
251255
endif()
252-
add_compile_options(-Wno-error)
253256
endif()
254257

255258
# Other

0 commit comments

Comments
 (0)