diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-11 16:18:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-11 17:06:23 (GMT) |
commit | e1f7ee3de71fc0e7a34bf05ec2cf4ec586ff9e32 (patch) | |
tree | 47a5dc6f427ae41244d3cb4d484e5aa21a8deda6 /Tests/Module | |
parent | 9554e1013ef5d9971092ed0cd45daf59b8a6bd87 (diff) | |
download | CMake-e1f7ee3de71fc0e7a34bf05ec2cf4ec586ff9e32.zip CMake-e1f7ee3de71fc0e7a34bf05ec2cf4ec586ff9e32.tar.gz CMake-e1f7ee3de71fc0e7a34bf05ec2cf4ec586ff9e32.tar.bz2 |
Test for compiler features, instead of for specific platforms.
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/GenerateExportHeader/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt index eb19afb..05d1519 100644 --- a/Tests/Module/GenerateExportHeader/CMakeLists.txt +++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt @@ -49,7 +49,7 @@ macro(_do_build Include Library LibrarySource Source) "if(CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))\n" " add_definitions(-Werror)\n" "else()\n" - " if(MSVC)\n" + " if(MSVC AND COMPILER_HAS_DEPRECATED)\n" # Treat deprecation warnings as errors. " add_definitions(/we4996)\n" " endif()\n" @@ -123,7 +123,7 @@ if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") endif() -if(MSVC) +if(MSVC AND COMPILER_HAS_DEPRECATED) add_definitions(/wd4996) endif() |