From e37486efab88a2f072dd342cc0c4dd711520e156 Mon Sep 17 00:00:00 2001 From: HyukWoo Park Date: Thu, 25 Jul 2024 16:03:11 +0900 Subject: [PATCH] Fix a minor build error for old clang compiler Signed-off-by: HyukWoo Park --- build/target.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/target.cmake b/build/target.cmake index 6db495ffe..06605197d 100644 --- a/build/target.cmake +++ b/build/target.cmake @@ -86,10 +86,14 @@ ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # Clang and AppleClang -fvisibility=hidden -fno-fast-math -fno-unsafe-math-optimizations -fdenormal-fp-math=ieee -Wno-type-limits -Wno-unused-result -Wno-unused-variable -Wno-invalid-offsetof -Wno-unused-function - -Wno-deprecated-declarations -Wno-unsupported-floating-point-opt -Wno-parentheses-equality -Wno-dynamic-class-memaccess -Wno-deprecated-register + -Wno-deprecated-declarations -Wno-parentheses-equality -Wno-dynamic-class-memaccess -Wno-deprecated-register -Wno-expansion-to-defined -Wno-return-type -Wno-overloaded-virtual -Wno-unused-private-field -Wno-deprecated-copy -Wno-atomic-alignment -Wno-ambiguous-reversed-operator -Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion -Wno-braced-scalar-init -Wno-unused-parameter ) + IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10) + # this feature supported after clang version 11 + SET (WALRUS_CXXFLAGS ${WALRUS_CXXFLAGS} -Wno-unsupported-floating-point-opt) + endif() SET (WALRUS_CXXFLAGS_DEBUG -O0 -Wall -Wextra -Werror) SET (WALRUS_CXXFLAGS_RELEASE -O2 -fno-stack-protector -fno-omit-frame-pointer) SET (WALRUS_THIRDPARTY_CFLAGS -w -g3 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -fvisibility=hidden)