cmake: IAR support option( MBEDTLS_FATAL_WARNINGS)
IAR toolchain makes some warning, forcing 'warning as error' is not for sure. Signed-off-by: savent <savent_gate@outlook.com>
This commit is contained in:
parent
78ddc3e8fc
commit
5d8adab983
2 changed files with 8 additions and 1 deletions
|
@ -227,7 +227,7 @@ if(CMAKE_COMPILER_IS_CLANG)
|
|||
endif(CMAKE_COMPILER_IS_CLANG)
|
||||
|
||||
if(CMAKE_COMPILER_IS_IAR)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts -Ohz")
|
||||
endif(CMAKE_COMPILER_IS_IAR)
|
||||
|
||||
if(CMAKE_COMPILER_IS_MSVC)
|
||||
|
@ -248,6 +248,10 @@ if(MBEDTLS_FATAL_WARNINGS)
|
|||
set(CMAKE_C_FLAGS_ASANDBG "${CMAKE_C_FLAGS_ASANDBG} -Wno-error=cpp")
|
||||
endif(UNSAFE_BUILD)
|
||||
endif(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU)
|
||||
|
||||
if (CMAKE_COMPILER_IS_IAR)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warning_are_errors")
|
||||
endif(CMAKE_COMPILER_IS_IAR)
|
||||
endif(MBEDTLS_FATAL_WARNINGS)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
|
|
3
ChangeLog.d/fix_cmake_using_iar_toolchain.txt
Normal file
3
ChangeLog.d/fix_cmake_using_iar_toolchain.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Bugfix
|
||||
* Fixed an issue that cause compile error using CMake IAR toolchain.
|
||||
Fixes #5964.
|
Loading…
Reference in a new issue