Test -Werror instead of enabling it per compiler.

Maybe the Intel compiler supports it too.
This commit is contained in:
Stephen Kelly 2011-08-12 10:47:08 +02:00
parent 9aab2aa77f
commit 01e9e983e3
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@ macro(_do_build Include Library LibrarySource Source)
"add_compiler_export_flags()\n" "add_compiler_export_flags()\n"
"if(CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))\n" "check_cxx_compiler_flag(-Werror HAS_WERROR_FLAG)\n"
"if(HAS_WERROR_FLAG)\n"
" add_definitions(-Werror)\n" " add_definitions(-Werror)\n"
"else()\n" "else()\n"
" if(MSVC AND COMPILER_HAS_DEPRECATED)\n" " if(MSVC AND COMPILER_HAS_DEPRECATED)\n"