summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-07-22 09:36:14 +0000
committerJörg Mayer <jmayer@loplof.de>2013-07-22 09:36:14 +0000
commit43ef0331281bae7ca7436550ab1809e84aced5b8 (patch)
tree35524d2324e889c53d2d6d3b6d2a300152b142ac /CMakeLists.txt
parentfb5a3b90d1bef00cf213cf6f9addf6f27df7920e (diff)
downloadwireshark-43ef0331281bae7ca7436550ab1809e84aced5b8.tar.gz
Don't use the program name to identify the compiler - it won't work
reliably in cases where the compiler is name /usr/bin/cc Use the internal variable CMAKE_<LANG>_COMPILER_ID instead, which is finally documented (but still called internal in the docs), see http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID svn path=/trunk/; revision=50784
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ff0bb6f2f..3aae5cb705 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,8 +238,7 @@ else() # TODO add alternate compiler flags for hiding symbols
" All shared library symbols will be exported.")
endif()
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER MATCHES ".*clang" OR
- CMAKE_CXX_COMPILER MATCHES ".*clang")
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set (C_UNUSED "__attribute__((unused))" )
else()
set (C_UNUSED "" )