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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-05-03 12:54:02 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-05-03 12:54:02 +0400
commit392d5de0aa2f901892b651ad37e44b1d289cf344 (patch)
tree65dddc2e9d7d1c55055a0ed4727524f59272b31a /intern/cycles/CMakeLists.txt
parent39dc3bce30215a7fbf130912b6025cb258f087e6 (diff)
Fix '-Werror=float-conversion' error with gcc < 4.9, for CMake
Scons is still TODO.
Diffstat (limited to 'intern/cycles/CMakeLists.txt')
-rw-r--r--intern/cycles/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 50fd1950494..a1b0030491e 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -128,8 +128,9 @@ include_directories(
# Warnings
-if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=float-conversion")
+if(CMAKE_COMPILER_IS_GNUCXX)
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
+ unset(_has_cxxflag_float_conversion)
endif()