Merge pull request #601 from YosysHQ/no-default-Werror

cmake: Don't enable any -Werror flags without opt-in
This commit is contained in:
gatecat 2021-02-26 08:06:07 +00:00 committed by GitHub
commit 49fae99063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ if (MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W4 /wd4100 /wd4244 /wd4125 /wd4800 /wd4456 /wd4458 /wd4305 /wd4459 /wd4121 /wd4996 /wd4127") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W4 /wd4100 /wd4244 /wd4125 /wd4800 /wd4456 /wd4458 /wd4305 /wd4459 /wd4121 /wd4996 /wd4127")
else() else()
# N.B. the -Wno-array-bounds is to work around a false positive in GCC 9 # N.B. the -Wno-array-bounds is to work around a false positive in GCC 9
set(WARN_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -Werror=sign-compare -Werror=return-type") set(WARN_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds")
if (WERROR) if (WERROR)
set(WARN_FLAGS "${WARN_FLAGS} -Werror") set(WARN_FLAGS "${WARN_FLAGS} -Werror")
endif() endif()