summaryrefslogtreecommitdiffstats
path: root/Modules/WriteCompilerDetectionHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-06-13 09:08:34 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-06-13 16:50:10 (GMT)
commitf0a0f3dcb42ee249d7ba0c09e674900adfb9ea2e (patch)
tree0cf7e010c48ae1129d71416af4c5d956030faedd /Modules/WriteCompilerDetectionHeader.cmake
parent627ad96bd38c37e338737ad656d98b24bd4f027d (diff)
downloadCMake-f0a0f3dcb42ee249d7ba0c09e674900adfb9ea2e.zip
CMake-f0a0f3dcb42ee249d7ba0c09e674900adfb9ea2e.tar.gz
CMake-f0a0f3dcb42ee249d7ba0c09e674900adfb9ea2e.tar.bz2
WCDH: Fix compiler id test for compatibility macros.
Enable the alignment features for Clang.
Diffstat (limited to 'Modules/WriteCompilerDetectionHeader.cmake')
-rw-r--r--Modules/WriteCompilerDetectionHeader.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index fb0dda1..593176c 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -428,7 +428,7 @@ function(write_compiler_detection_header
set(file_content "${file_content}
# if ${def_name}
# define ${def_value} alignas(X)
-# elif ${prefix_arg}_COMPILER_IS_GNU
+# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang
# define ${def_value} __attribute__ ((__aligned__(X)))
# else
# define ${def_value}
@@ -440,7 +440,7 @@ function(write_compiler_detection_header
set(file_content "${file_content}
# if ${def_name}
# define ${def_value} alignof(X)
-# elif ${prefix_arg}_COMPILER_IS_GNU
+# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang
# define ${def_value} __alignof__(X)
# endif
\n")
@@ -495,10 +495,10 @@ function(write_compiler_detection_header
# if ${def_name}
# define ${def_value} [[deprecated]]
# define ${def_value}_MSG(MSG) [[deprecated(MSG)]]
-# elif defined(__GNUC__) || defined(__clang__)
+# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang
# define ${def_value} __attribute__((__deprecated__))
# define ${def_value}_MSG(MSG) __attribute__((__deprecated__(MSG)))
-# elif defined(_MSC_VER)
+# elif ${prefix_arg}_COMPILER_IS_MSVC
# define ${def_value} __declspec(deprecated)
# define ${def_value}_MSG(MSG) __declspec(deprecated(MSG))
# else