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 00:46:24 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-17 01:18:25 +0300
commitfbf4fe6963a44aa5d8e66035e5c1e641285a9423 (patch)
treec74a4d61252a68417c44eba81198b75fbfd7508c
parent59da22c30927f11194a73d678d0488e6bef7074c (diff)
Fix missing Cycles implicit float/double conversion error with Clang
Since these are errors with GCC and Visual Studio.
-rw-r--r--intern/cycles/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 1500743763b..64fe70c886d 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -341,6 +341,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
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))