[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3551-g9484d01

Stephen Kelly steveire at gmail.com
Thu Jun 5 08:51:05 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  9484d015efb372894044df4195a8404fa4795bc8 (commit)
       via  4bdeceb5e823c56f92486d3eb3e8eb081193fec7 (commit)
      from  612598bcd658c47b60ecb9542588e27626c5381a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9484d015efb372894044df4195a8404fa4795bc8
commit 9484d015efb372894044df4195a8404fa4795bc8
Merge: 612598b 4bdeceb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jun 5 08:51:02 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 5 08:51:02 2014 -0400

    Merge topic 'WriteCompilerDetectionHeader-deprecated-define' into next
    
    4bdeceb5 WCDH: Add compatibility defines for deprecation.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bdeceb5e823c56f92486d3eb3e8eb081193fec7
commit 4bdeceb5e823c56f92486d3eb3e8eb081193fec7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 14 22:10:10 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jun 5 14:46:01 2014 +0200

    WCDH: Add compatibility defines for deprecation.

diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index f80943d..7b4593b 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -133,15 +133,17 @@
 # ``static_assert``, or ignored if using the backward compatibility
 # implementation.
 #
-# ====================== ================================ ===================
-#         Feature                    Define                     Symbol
-# ====================== ================================ ===================
-# ``cxx_alignas``         ``<PREFIX>_ALIGNAS``             ``alignas``
-# ``cxx_alignof``         ``<PREFIX>_ALIGNOF``             ``alignof``
-# ``cxx_nullptr``         ``<PREFIX>_NULLPTR``             ``nullptr``
-# ``cxx_static_assert``   ``<PREFIX>_STATIC_ASSERT``       ``static_assert``
-# ``cxx_static_assert``   ``<PREFIX>_STATIC_ASSERT_MSG``   ``static_assert``
-# ====================== ================================ ===================
+# ============================= ================================ =====================
+#           Feature                          Define                     Symbol
+# ============================= ================================ =====================
+# ``cxx_alignas``                ``<PREFIX>_ALIGNAS``             ``alignas``
+# ``cxx_alignof``                ``<PREFIX>_ALIGNOF``             ``alignof``
+# ``cxx_nullptr``                ``<PREFIX>_NULLPTR``             ``nullptr``
+# ``cxx_static_assert``          ``<PREFIX>_STATIC_ASSERT``       ``static_assert``
+# ``cxx_static_assert``          ``<PREFIX>_STATIC_ASSERT_MSG``   ``static_assert``
+# ``cxx_attribute_deprecated``   ``<PREFIX>_DEPRECATED``          ``[[deprecated]]``
+# ``cxx_attribute_deprecated``   ``<PREFIX>_DEPRECATED_MSG``      ``[[deprecated]]``
+# ============================= ================================ =====================
 
 
 #=============================================================================
@@ -402,6 +404,27 @@ function(write_compiler_detection_header
 #  endif
 \n")
       endif()
+      if (feature STREQUAL cxx_attribute_deprecated)
+        set(def_name ${prefix_arg}_${feature_PP})
+        set(def_value "${prefix_arg}_DEPRECATED")
+        set(file_content "${file_content}
+#  ifndef ${def_value}
+#    if ${def_name}
+#      define ${def_value} [[deprecated]]
+#      define ${def_value}_MSG(MSG) [[deprecated(MSG)]]
+#    elif defined(__GNUC__) || defined(__clang__)
+#      define ${def_value} __attribute__((__deprecated__))
+#      define ${def_value}_MSG(MSG) __attribute__((__deprecated__(MSG)))
+#    elif defined(_MSC_VER)
+#      define ${def_value} __declspec(deprecated)
+#      define ${def_value}_MSG(MSG) __declspec(deprecated(MSG))
+#    else
+#      define ${def_value}
+#      define ${def_value}_MSG(MSG)
+#    endif
+#  endif
+\n")
+      endif()
     endforeach()
 
     set(file_content "${file_content}#endif\n")

-----------------------------------------------------------------------

Summary of changes:
 Modules/WriteCompilerDetectionHeader.cmake |   41 ++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list