[Cmake-commits] CMake branch, master, updated. v3.11.0-rc4-283-g64bb657
Kitware Robot
kwrobot at kitware.com
Wed Mar 21 09:05:03 EDT 2018
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 64bb65777ad011d96c6bedca36b24df7d9a1371d (commit)
via 3b7be02480bbc462f2ebdd0eff156675dd57c50a (commit)
from debe4010a82a7cb75b12009893e797c8234eca9c (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=64bb65777ad011d96c6bedca36b24df7d9a1371d
commit 64bb65777ad011d96c6bedca36b24df7d9a1371d
Merge: debe401 3b7be02
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 21 12:55:37 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Mar 21 08:56:09 2018 -0400
Merge topic 'ccmake-solaris'
3b7be02480 ccmake: Fix compilation with ncurses on Solaris
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1876
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b7be02480bbc462f2ebdd0eff156675dd57c50a
commit 3b7be02480bbc462f2ebdd0eff156675dd57c50a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 20 11:39:28 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 20 11:39:28 2018 -0400
ccmake: Fix compilation with ncurses on Solaris
On Solaris the ncurses header may define an `__attribute__` macro.
This breaks C++ headers that use `__attribute__(...)` syntax.
Somehow it causes references to unresolved symbols:
__gthrw_pthread_once
__gthrw_pthread_mutex_lock
__gthrw_pthread_mutex_unlock
instead of references to the correct symbols:
pthread_once
pthread_mutex_lock
pthread_mutex_unlock
Detect this case and undefine the `__attribute__` macro after
including the curses headers.
diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h
index 332d2af..60bad94 100644
--- a/Source/CursesDialog/cmCursesStandardIncludes.h
+++ b/Source/CursesDialog/cmCursesStandardIncludes.h
@@ -5,6 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+// Record whether __attribute__ is currently defined. See purpose below.
+#ifndef __attribute__
+#define cm_no__attribute__
+#endif
+
#if defined(__hpux)
#define _BOOL_DEFINED
#include <sys/time.h>
@@ -29,4 +34,12 @@ inline void curses_clear()
#undef erase
#undef clear
+// The curses headers on some platforms (e.g. Solaris) may
+// define __attribute__ as a macro. This breaks C++ headers
+// in some cases, so undefine it now.
+#if defined(cm_no__attribute__) && defined(__attribute__)
+#undef __attribute__
+#endif
+#undef cm_no__attribute__
+
#endif // cmCursesStandardIncludes_h
-----------------------------------------------------------------------
Summary of changes:
Source/CursesDialog/cmCursesStandardIncludes.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list