From 8e932e8c77b97f5f6ccfae8d80e37775d24e0c88 Mon Sep 17 00:00:00 2001 From: Markus Becker Date: Thu, 16 Apr 2020 02:41:22 +0200 Subject: [PATCH] [cmake] disable -pedantic-errors together with -Werror (#4775) This allows to work-around a compile error that is happening in Zephyr . Signed-off-by: Markus Becker --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71fa22dba..3c997e89a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,9 +38,9 @@ include("${PROJECT_SOURCE_DIR}/etc/cmake/options.cmake") include("${PROJECT_SOURCE_DIR}/etc/cmake/functions.cmake") if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang") - option(OT_COMPILE_WARNING_AS_ERROR "whether to include -Werror with gcc-compatible compilers") + option(OT_COMPILE_WARNING_AS_ERROR "whether to include -Werror -pedantic-errors with gcc-compatible compilers") if (OT_COMPILE_WARNING_AS_ERROR) - set(OT_CFLAGS -Werror) + set(OT_CFLAGS -Werror -pedantic-errors) endif() if(OT_COVERAGE) @@ -50,8 +50,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang") endif() set(OT_CFLAGS - $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -pedantic-errors> - $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions -pedantic-errors> + $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow> + $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions> ) endif()