diff --git a/CMakeLists.txt b/CMakeLists.txt index 9605fbf7b..71fa22dba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang") set(OT_CFLAGS $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -pedantic-errors> - $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions> + $<$:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions -pedantic-errors> ) endif() diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index ea2c74271..6a7e28a14 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -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 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b4de4af9b..3a4c3b092 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -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 diff --git a/src/lib/hdlc/CMakeLists.txt b/src/lib/hdlc/CMakeLists.txt index a56185a52..1a5ced0ad 100644 --- a/src/lib/hdlc/CMakeLists.txt +++ b/src/lib/hdlc/CMakeLists.txt @@ -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} diff --git a/src/lib/spinel/CMakeLists.txt b/src/lib/spinel/CMakeLists.txt index fd901ca7a..fd5f38644 100644 --- a/src/lib/spinel/CMakeLists.txt +++ b/src/lib/spinel/CMakeLists.txt @@ -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 diff --git a/src/ncp/CMakeLists.txt b/src/ncp/CMakeLists.txt index 01fa7cc97..154f5ae25 100644 --- a/src/ncp/CMakeLists.txt +++ b/src/ncp/CMakeLists.txt @@ -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