[Cmake-commits] CMake branch, next, updated. v2.8.5-1928-g3bc31e6

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Sep 20 00:18:47 EDT 2011


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  3bc31e6774e4cd8728be8de5d591297f4b36d7a7 (commit)
       via  41e2b1d824033551a63b8a10fb7f16783e0d6caa (commit)
      from  88f70a7bc02a96b57ea22f7f265dead615518eef (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=3bc31e6774e4cd8728be8de5d591297f4b36d7a7
commit 3bc31e6774e4cd8728be8de5d591297f4b36d7a7
Merge: 88f70a7 41e2b1d
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 20 00:18:45 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 20 00:18:45 2011 -0400

    Merge topic 'generate-export-header' into next
    
    41e2b1d Make add_compiler_export_flags a function again.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41e2b1d824033551a63b8a10fb7f16783e0d6caa
commit 41e2b1d824033551a63b8a10fb7f16783e0d6caa
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 20 00:16:16 2011 -0400
Commit:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
CommitDate: Tue Sep 20 00:16:16 2011 -0400

    Make add_compiler_export_flags a function again.
    
    Making this a macro had unintended issues on (among others) Windows
    compilers. Moving it back to being a function using PARENT_SCOPE still
    satisfies the use case where we simply want to obtain the extra flags.

diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index aaeff47..7df274e 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -1,6 +1,6 @@
 # - Function for generation of export macros for libraries
 # This module provides the function GENERATE_EXPORT_HEADER() and the
-# accompanying ADD_COMPILER_EXPORT_FLAGS() macro.
+# accompanying ADD_COMPILER_EXPORT_FLAGS() function.
 #
 # The GENERATE_EXPORT_HEADER function can be used to generate a file suitable
 # for preprocessor inclusion which contains EXPORT macros to be used in
@@ -21,7 +21,7 @@
 # ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )
 #
 # By default GENERATE_EXPORT_HEADER() generates macro names in a file name
-# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS macro
+# 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
@@ -351,7 +351,7 @@ function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
   _do_generate_export_header(${TARGET_LIBRARY} ${ARGN})
 endfunction()
 
-macro(add_compiler_export_flags)
+function(add_compiler_export_flags)
 
   _test_compiler_hidden_visibility()
   _test_compiler_has_deprecated()
@@ -370,8 +370,8 @@ macro(add_compiler_export_flags)
   # Either return the extra flags needed in the supplied argument, or to the
   # CMAKE_CXX_FLAGS if no argument is supplied.
   if(ARGV0)
-    set(${ARGV0} "${EXTRA_FLAGS}")
+    set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE)
   else()
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE)
   endif()
-endmacro()
+endfunction()

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

Summary of changes:
 Modules/GenerateExportHeader.cmake |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list