From e016f6ca38414eef9b574fb54a81930437ded28c Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 11 May 2016 12:59:41 +0200 Subject: [PATCH] Clang: Do not use new pointer option --- cmake/common/px4_base.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index f97c8e8efe..5650e0aa2a 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -650,9 +650,10 @@ function(px4_add_common_flags) -D__CUSTOM_FILE_IO__ ) - if (NOT "${OS}" STREQUAL "qurt") - # -fcheck-new is not supported by clang-3.5 from - # HEXAGON_Tools/7.2.10/Tools/bin/hexagon-clang. + if (NOT (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")) + # -fcheck-new is a no-op for Clang in general + # and has no effect, but can generate a compile + # error for some OS list(APPEND cxx_compile_flags -fcheck-new )