message: cmake: check compiler version before adding -Wno-misleading-indentation flag
diff: @@ -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)
  