[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4069-g7a9a80f

Stephen Kelly steveire at gmail.com
Mon Sep 2 05:01:01 EDT 2013


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  7a9a80fc9a574964a9df6470a173a8a1798d5f3a (commit)
       via  0f3a66673f9333b37df29c2bd37969c418628ac0 (commit)
       via  ce6c7366f77d019d4a04c0e55199b568098a5adb (commit)
      from  cc33c4c0f3557cd153dfc196fc29ec4f834c4253 (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=7a9a80fc9a574964a9df6470a173a8a1798d5f3a
commit 7a9a80fc9a574964a9df6470a173a8a1798d5f3a
Merge: cc33c4c 0f3a666
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Sep 2 05:00:55 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 2 05:00:55 2013 -0400

    Merge topic 'deprecate-add_compiler_export_flags' into next
    
    0f3a666 GenerateExportHeader: Deprecate add_compiler_export_flags function.
    ce6c736 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f3a66673f9333b37df29c2bd37969c418628ac0
commit 0f3a66673f9333b37df29c2bd37969c418628ac0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Sep 2 10:57:55 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Sep 2 10:57:55 2013 +0200

    GenerateExportHeader: Deprecate add_compiler_export_flags function.
    
    This is made obsolete by the CXX_VISIBILITY_PRESET and
    VISIBILITY_INLINES_HIDDEN target properties.

diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 4ef14ac..b2fda09 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -1,6 +1,5 @@
 # - Function for generation of export macros for libraries
-# This module provides the function GENERATE_EXPORT_HEADER() and the
-# accompanying ADD_COMPILER_EXPORT_FLAGS() function.
+# This module provides the function GENERATE_EXPORT_HEADER().
 #
 # The GENERATE_EXPORT_HEADER function can be used to generate a file suitable
 # for preprocessor inclusion which contains EXPORT macros to be used in
@@ -18,20 +17,17 @@
 #             [PREFIX_NAME <prefix_name>]
 # )
 #
-# ADD_COMPILER_EXPORT_FLAGS( [<output_variable>] )
+# The target properties CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
+# can be used to add the appropriate compile flags for targets. See the
+# documentation of those target properties, and the convenience variables
+# CMAKE_CXX_VISIBILITY_PRESET and CMAKE_VISIBILITY_INLINES_HIDDEN.
 #
 # By default GENERATE_EXPORT_HEADER() generates macro names in a file name
-# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function
-# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on
-# Windows which does not need extra compiler flags for exporting support. You
-# may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will
-# be populated with the required CXX_FLAGS required to enable visibility support
-# for the compiler/architecture in use.
+# determined by the name of the library. This means that in the simplest case,
+# users of generate_export_header will be equivalent to:
 #
-# This means that in the simplest case, users of these functions will be
-# equivalent to:
-#
-#   add_compiler_export_flags()
+#   set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+#   set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
 #   add_library(somelib someclass.cpp)
 #   generate_export_header(somelib)
 #   install(TARGETS somelib DESTINATION ${LIBRARY_INSTALL_DIR})
@@ -128,6 +124,20 @@
 #   generate_export_header(somelib PREFIX_NAME VTK_)
 #
 # Generates the macros VTK_SOMELIB_EXPORT etc.
+#
+#
+# ADD_COMPILER_EXPORT_FLAGS( [<output_variable>] )
+#
+# The ADD_COMPILER_EXPORT_FLAGS function
+# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on
+# Windows which does not need extra compiler flags for exporting support. You
+# may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will
+# be populated with the required CXX_FLAGS required to enable visibility support
+# for the compiler/architecture in use.
+#
+# This function is deprecated. Set the target properties CXX_VISIBILITY_PRESET
+# and VISIBILITY_INLINES_HIDDEN instead.
+#
 
 #=============================================================================
 # Copyright 2011 Stephen Kelly <steveire at gmail.com>
@@ -326,6 +336,17 @@ function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
 endfunction()
 
 function(add_compiler_export_flags)
+  if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+    if(CMAKE_WARN_DEPRECATED)
+      set(messageType WARNING)
+    endif()
+    if(CMAKE_ERROR_DEPRECATED)
+      set(messageType FATAL_ERROR)
+    endif()
+    if(messageType)
+      message(${messageType} "The add_compiler_export_flags function is obsolete. Use the CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties instead.")
+    endif()
+  endif()
 
   _test_compiler_hidden_visibility()
   _test_compiler_has_deprecated()

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

Summary of changes:
 Modules/GenerateExportHeader.cmake |   47 ++++++++++++++++++++++++++----------
 Source/CMakeVersion.cmake          |    2 +-
 2 files changed, 35 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list