Fix '-Werror=float-conversion' error with gcc < 4.9, for CMake

Scons is still TODO.
This commit is contained in:
Bastien Montagne 2014-05-03 10:54:02 +02:00
parent 39dc3bce30
commit 392d5de0aa
1 changed files with 3 additions and 2 deletions

View File

@ -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()