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, master has been updated
via 3946cbc505a066677efe1faea3cc2d051b1132bc (commit)
via dc863592bce3f4cda927c55a550af661a0663513 (commit)
from 948eb3b2bf450d9c1a562af9cb2f9cc188a9ec6a (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3946cbc505a066677efe1faea3cc2d051b1132bc
commit 3946cbc505a066677efe1faea3cc2d051b1132bc
Merge: 948eb3b dc86359
Author: Brad King <[email protected]>
AuthorDate: Wed Mar 21 13:25:54 2018 +0000
Commit: Kitware Robot <[email protected]>
CommitDate: Wed Mar 21 09:26:37 2018 -0400
Merge topic 'wcdh-gcc-null'
dc863592bc WCDH: use better fallback value for nullptr with old gcc versions
Acked-by: Kitware Robot <[email protected]>
Merge-request: !1877
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc863592bce3f4cda927c55a550af661a0663513
commit dc863592bce3f4cda927c55a550af661a0663513
Author: Rolf Eike Beer <[email protected]>
AuthorDate: Mon Mar 19 21:52:40 2018 +0100
Commit: Rolf Eike Beer <[email protected]>
CommitDate: Tue Mar 20 22:01:48 2018 +0100
WCDH: use better fallback value for nullptr with old gcc versions
GCC supports the __null builtin basically forever (since at least 2.95),
which
behaves very much like nullptr later does. Use this instead of plain "0" as
fallback value, otherwise passing the define to functions annotated with
__attribute__((sentinel)) will result in a compiler warning.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake
b/Modules/WriteCompilerDetectionHeader.cmake
index e7f9912..675df84 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -557,7 +557,18 @@ template<> struct ${prefix_arg}StaticAssert<true>{};
# endif
\n")
endif()
- _simpledefine(cxx_nullptr NULLPTR nullptr 0)
+ if (feature STREQUAL cxx_nullptr)
+ set(def_value "${prefix_arg}_NULLPTR")
+ string(APPEND file_content "
+# if defined(${def_name}) && ${def_name}
+# define ${def_value} nullptr
+# elif ${prefix_arg}_COMPILER_IS_GNU
+# define ${def_value} __null
+# else
+# define ${def_value} 0
+# endif
+\n")
+ endif()
if (feature STREQUAL cxx_thread_local)
set(def_value "${prefix_arg}_THREAD_LOCAL")
string(APPEND file_content "
-----------------------------------------------------------------------
Summary of changes:
Modules/WriteCompilerDetectionHeader.cmake | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
https://cmake.org/mailman/listinfo/cmake-commits