mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
cmake: check compiler version before adding -Wno-misleading-indentation flag
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
d256a225bf
commit
d282d479bb
@ -91,13 +91,16 @@ endfunction ()
|
||||
|
||||
# Compiler flags common to both C and CXX
|
||||
# Enable -Wall
|
||||
# GCC-6 added -Wmisleading-indentation to -Wall, skip these for now
|
||||
set (C_CXX_WARNING_FLAGS -Wall
|
||||
-Wno-misleading-indentation
|
||||
-Wno-strict-aliasing
|
||||
-Wno-deprecated-declarations # Temp fix for MRAA deprecated methods
|
||||
)
|
||||
|
||||
# GCC-6 added -Wmisleading-indentation to -Wall, skip these for now
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6")
|
||||
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
|
||||
endif ()
|
||||
|
||||
# Warnings as errors?
|
||||
if (WERROR)
|
||||
list (APPEND C_CXX_WARNING_FLAGS -Werror)
|
||||
|
Loading…
x
Reference in New Issue
Block a user