aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-02-25 11:21:39 +0000
committergatecat <gatecat@ds0.me>2021-02-25 15:15:25 +0000
commit23413a4d12ad070c8a356c5a3186f81def705c54 (patch)
treee18884eb5006aa991402b3576e188d7977ef88e8 /CMakeLists.txt
parent17183fff05e52471ff4c619fc24e104234489803 (diff)
downloadnextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.tar.gz
nextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.tar.bz2
nextpnr-23413a4d12ad070c8a356c5a3186f81def705c54.zip
Fix compiler warnings introduced by -Wextra
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2377975..05b0cce7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,8 @@ if (MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /W4 /wd4100 /wd4244 /wd4125 /wd4800 /wd4456 /wd4458 /wd4305 /wd4459 /wd4121 /wd4996")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W4 /wd4100 /wd4244 /wd4125 /wd4800 /wd4456 /wd4458 /wd4305 /wd4459 /wd4121 /wd4996 /wd4127")
else()
- set(WARN_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=sign-compare -Werror=return-type")
+ # 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")
if (WERROR)
set(WARN_FLAGS "${WARN_FLAGS} -Werror")
endif()