mirror of
https://github.com/espressif/openthread.git
synced 2025-08-06 14:52:18 +08:00
[cmake] add pedantic-errors flag (#4808)
This commit is contained in:
@ -51,7 +51,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang")
|
||||
|
||||
set(OT_CFLAGS
|
||||
$<$<COMPILE_LANGUAGE:C>:${OT_CFLAGS} -Wall -Wextra -Wshadow -pedantic-errors>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions -pedantic-errors>
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -33,7 +33,7 @@ set_target_properties(
|
||||
openthread-cli-ftd openthread-cli-mtd
|
||||
PROPERTIES
|
||||
C_STANDARD 99
|
||||
CXX_STANDARD 98
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_compile_definitions(openthread-cli-ftd PRIVATE
|
||||
|
@ -34,7 +34,7 @@ set_target_properties(
|
||||
openthread-ftd openthread-mtd openthread-radio
|
||||
PROPERTIES
|
||||
C_STANDARD 99
|
||||
CXX_STANDARD 98
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_compile_definitions(openthread-ftd PRIVATE
|
||||
|
@ -30,6 +30,13 @@ add_library(openthread-hdlc
|
||||
hdlc.cpp
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
openthread-hdlc
|
||||
PROPERTIES
|
||||
C_STANDARD 99
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_include_directories(openthread-hdlc
|
||||
PUBLIC
|
||||
${OT_PUBLIC_INCLUDES}
|
||||
|
@ -29,6 +29,13 @@
|
||||
add_library(openthread-spinel-ncp)
|
||||
add_library(openthread-spinel-rcp)
|
||||
|
||||
set_target_properties(
|
||||
openthread-spinel-ncp openthread-spinel-rcp
|
||||
PROPERTIES
|
||||
C_STANDARD 99
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_compile_definitions(openthread-spinel-ncp PRIVATE
|
||||
${OT_PRIVATE_DEFINES}
|
||||
OPENTHREAD_FTD=1
|
||||
|
@ -32,10 +32,10 @@ add_library(openthread-rcp)
|
||||
|
||||
# We depend on C++11 to validate that NCP handlers are sorted.
|
||||
set_target_properties(
|
||||
openthread-ncp-mtd openthread-rcp
|
||||
openthread-ncp-ftd openthread-ncp-mtd openthread-rcp
|
||||
PROPERTIES
|
||||
C_STANDARD 99
|
||||
CXX_STANDARD 98
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
|
||||
target_compile_definitions(openthread-ncp-ftd PRIVATE
|
||||
|
Reference in New Issue
Block a user