summaryrefslogtreecommitdiffstats
path: root/Tests/Module
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-12 08:47:08 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-08-12 08:47:08 (GMT)
commit01e9e983e31dcd33bd5991b67e131e80e37f86e1 (patch)
tree3340f28408cd3adf4ed70462330451d0ee37cdaf /Tests/Module
parent9aab2aa77f12a938ef4a819ebb9830a1918f65ce (diff)
downloadCMake-01e9e983e31dcd33bd5991b67e131e80e37f86e1.zip
CMake-01e9e983e31dcd33bd5991b67e131e80e37f86e1.tar.gz
CMake-01e9e983e31dcd33bd5991b67e131e80e37f86e1.tar.bz2
Test -Werror instead of enabling it per compiler.
Maybe the Intel compiler supports it too.
Diffstat (limited to 'Tests/Module')
-rw-r--r--Tests/Module/GenerateExportHeader/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt
index febf90f..b3f646f 100644
--- a/Tests/Module/GenerateExportHeader/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt
@@ -46,7 +46,9 @@ macro(_do_build Include Library LibrarySource Source)
"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"
"else()\n"
" if(MSVC AND COMPILER_HAS_DEPRECATED)\n"