Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-11-17 19:22:05 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-17 19:29:41 +0300
commit89d5714d8f233b4bbb83f6a7b33237e2ec04ee79 (patch)
treebeee985786bb7660ec42f7f11bda91bc77c31bc9 /intern/cycles/CMakeLists.txt
parentea7efa556936851075c2bda2f772ba4a7674a01c (diff)
Build: match GCC and Clang float conversion warnings in Cycles
Diffstat (limited to 'intern/cycles/CMakeLists.txt')
-rw-r--r--intern/cycles/CMakeLists.txt5
1 files changed, 1 insertions, 4 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 64fe70c886d..6ba80bf9e18 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -334,16 +334,13 @@ else()
endif()
# Warnings
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
unset(_has_cxxflag_float_conversion)
unset(_has_cxxflag_double_promotion)
unset(_has_no_error_unused_macros)
-elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
- ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_implicit_float_conversion "-Werror=implicit-float-conversion")
- unset(_has_cxxflag_implicit_float_conversion)
endif()
if(WITH_CYCLES_CUDA_BINARIES AND (NOT WITH_CYCLES_CUBIN_COMPILER))