[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3456-g1222f93

Vadim Zhukov persgray at gmail.com
Mon Jul 29 04:58:08 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  1222f937e14b2a6087bf95e7a7b6e7c008ee7fdb (commit)
       via  3a1c57cf8133783b51e05c6d8deee4b47e7a1085 (commit)
       via  19de7dc41505261fccf9560bacc1d8aaa7f26490 (commit)
      from  e56389dafebd7317c9c6a5c6a59cc271b4c5587a (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=1222f937e14b2a6087bf95e7a7b6e7c008ee7fdb
commit 1222f937e14b2a6087bf95e7a7b6e7c008ee7fdb
Merge: e56389d 3a1c57c
Author:     Vadim Zhukov <persgray at gmail.com>
AuthorDate: Mon Jul 29 04:58:06 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 29 04:58:06 2013 -0400

    Merge topic 'add-cmake_reset_check_state' into next
    
    3a1c57c Fix documentation bugs, noted by and input from neundorf at .
    19de7dc Add cmake_reset_check_state() macro.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a1c57cf8133783b51e05c6d8deee4b47e7a1085
commit 3a1c57cf8133783b51e05c6d8deee4b47e7a1085
Author:     Vadim Zhukov <persgray at gmail.com>
AuthorDate: Mon Jul 29 12:45:29 2013 +0400
Commit:     Vadim Zhukov <persgray at gmail.com>
CommitDate: Mon Jul 29 12:45:29 2013 +0400

    Fix documentation bugs, noted by and input from neundorf at .

diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake
index c25e28d..b37b706 100644
--- a/Modules/CMakePushCheckState.cmake
+++ b/Modules/CMakePushCheckState.cmake
@@ -3,7 +3,8 @@
 # CMAKE_POP_CHECK_STATE()
 # and
 # CMAKE_RESET_CHECK_STATE()
-# These macros can be used to save, restore and reset the state of the variables
+# These macros can be used to save, restore and reset (i.e., clear contents)
+# the state of the variables
 # CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES
 # and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake,
 # like e.g. check_function_exists() etc.
@@ -12,7 +13,9 @@
 # but after the Find-module has been executed they should have the same value
 # as they had before.
 #
-# CMAKE_PUSH_CHECK_STATE() macro receives optional
+# CMAKE_PUSH_CHECK_STATE() macro receives optional argument RESET. Whether it's specified,
+# CMAKE_PUSH_CHECK_STATE() will set all CMAKE_REQUIRED_* variables to empty values, same
+# as CMAKE_RESET_CHECK_STATE() call will do.
 #
 # Usage:
 #   cmake_push_check_state(RESET)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19de7dc41505261fccf9560bacc1d8aaa7f26490
commit 19de7dc41505261fccf9560bacc1d8aaa7f26490
Author:     Vadim Zhukov <persgray at gmail.com>
AuthorDate: Sun Jul 28 14:11:51 2013 +0400
Commit:     Vadim Zhukov <persgray at gmail.com>
CommitDate: Sun Jul 28 14:11:51 2013 +0400

    Add cmake_reset_check_state() macro.
    
    It's acknowledged that check state should not generally nest,
    so it should be cleared when used, for example, in Find* module.
    
    Also, add optional RESET argument to cmake_push_check_state().
    
    General idea approved by neundorf at .

diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake
index 08809bf..c25e28d 100644
--- a/Modules/CMakePushCheckState.cmake
+++ b/Modules/CMakePushCheckState.cmake
@@ -1,8 +1,9 @@
-# This module defines two macros:
+# This module defines three macros:
 # CMAKE_PUSH_CHECK_STATE()
-# and
 # CMAKE_POP_CHECK_STATE()
-# These two macros can be used to save and restore the state of the variables
+# and
+# CMAKE_RESET_CHECK_STATE()
+# These macros can be used to save, restore and reset the state of the variables
 # CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES
 # and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake,
 # like e.g. check_function_exists() etc.
@@ -11,9 +12,14 @@
 # but after the Find-module has been executed they should have the same value
 # as they had before.
 #
+# CMAKE_PUSH_CHECK_STATE() macro receives optional
+#
 # Usage:
-#   cmake_push_check_state()
-#   set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF)
+#   cmake_push_check_state(RESET)
+#   set(CMAKE_REQUIRED_DEFINITIONS -DSOME_MORE_DEF)
+#   check_function_exists(...)
+#   cmake_reset_check_state()
+#   set(CMAKE_REQUIRED_DEFINITIONS -DANOTHER_DEF)
 #   check_function_exists(...)
 #   cmake_pop_check_state()
 
@@ -31,6 +37,15 @@
 #  License text for the above reference.)
 
 
+macro(CMAKE_RESET_CHECK_STATE)
+
+   set(CMAKE_REQUIRED_INCLUDES)
+   set(CMAKE_REQUIRED_DEFINITIONS)
+   set(CMAKE_REQUIRED_LIBRARIES)
+   set(CMAKE_REQUIRED_FLAGS)
+
+endmacro()
+
 macro(CMAKE_PUSH_CHECK_STATE)
 
    if(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER)
@@ -43,6 +58,11 @@ macro(CMAKE_PUSH_CHECK_STATE)
    set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
    set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}   ${CMAKE_REQUIRED_LIBRARIES})
    set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}       ${CMAKE_REQUIRED_FLAGS})
+
+   if (ARGC GREATER 0 AND ARGV0 STREQUAL "RESET")
+      cmake_reset_check_state()
+   endif()
+
 endmacro()
 
 macro(CMAKE_POP_CHECK_STATE)

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

Summary of changes:
 Modules/CMakePushCheckState.cmake |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list