[Cmake-commits] CMake branch, master, updated. v3.14.4-979-g92b7a8f
Kitware Robot
kwrobot at kitware.com
Thu May 16 10:23:09 EDT 2019
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 92b7a8fa2976208e3f7e5f1c5db422982b0dc1d4 (commit)
via 9fdad3a601e529e07c23d34cab8279747e11054e (commit)
via 62b0d14e24907f1b234d18035c3a44b94b32c808 (commit)
via fb39f09dc2b4bc7ccca9a8836c4bca4e879a0ed5 (commit)
via e1e3935f5d93687040738943bccdd53b6926f9ae (commit)
via 23b3ca5e1f599d05e822b651a09bb8b9e0df6240 (commit)
via 49f8351a1812ea55acd97aca15f72bf677e00fa9 (commit)
from 82c6ec964db9ff3cc6bece9bc0667e5ec691f02d (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=92b7a8fa2976208e3f7e5f1c5db422982b0dc1d4
commit 92b7a8fa2976208e3f7e5f1c5db422982b0dc1d4
Merge: 9fdad3a fb39f09
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 16 14:21:22 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 16 10:21:56 2019 -0400
Merge topic 'sunpro-supports-cxx14-release-note'
fb39f09dc2 Help: Add release note that SunPro supports C++14
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3329
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fdad3a601e529e07c23d34cab8279747e11054e
commit 9fdad3a601e529e07c23d34cab8279747e11054e
Merge: 62b0d14 e1e3935
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 16 14:20:51 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 16 10:21:02 2019 -0400
Merge topic 'FindBoost-allow-root'
e1e3935f5d FindBoost: Remove obsolete diagnostic message about Boost_ROOT
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3323
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62b0d14e24907f1b234d18035c3a44b94b32c808
commit 62b0d14e24907f1b234d18035c3a44b94b32c808
Merge: 82c6ec9 23b3ca5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 16 14:19:40 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 16 10:19:51 2019 -0400
Merge topic 'update-kwsys'
23b3ca5e1f Merge branch 'upstream-KWSys' into update-kwsys
49f8351a18 KWSys 2019-05-15 (dea11658)
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3325
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb39f09dc2b4bc7ccca9a8836c4bca4e879a0ed5
commit fb39f09dc2b4bc7ccca9a8836c4bca4e879a0ed5
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Wed May 15 12:29:36 2019 -0400
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Wed May 15 12:29:36 2019 -0400
Help: Add release note that SunPro supports C++14
diff --git a/Help/release/dev/sunpro-supports-cxx14.rst b/Help/release/dev/sunpro-supports-cxx14.rst
new file mode 100644
index 0000000..c287386
--- /dev/null
+++ b/Help/release/dev/sunpro-supports-cxx14.rst
@@ -0,0 +1,4 @@
+sunpro-supports-cxx14
+---------------------
+
+* SunPro compiler have learned how to compile C++14.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1e3935f5d93687040738943bccdd53b6926f9ae
commit e1e3935f5d93687040738943bccdd53b6926f9ae
Author: Dennis Klein <d.klein at gsi.de>
AuthorDate: Tue May 14 20:10:22 2019 +0200
Commit: Dennis Klein <d.klein at gsi.de>
CommitDate: Wed May 15 15:45:14 2019 +0200
FindBoost: Remove obsolete diagnostic message about Boost_ROOT
CMake 3.12 introduced <package>_ROOT CMake and environment variables to
be valid hints to find_package(<package>). Defining Boost_ROOT is no
longer wrong if CMP0074 is set to NEW.
Fixes #18810
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 23549cb..018f675 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1265,7 +1265,11 @@ if(WIN32)
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
endif()
-_Boost_CHECK_SPELLING(Boost_ROOT)
+cmake_policy(GET CMP0074 _Boost_CMP0074)
+if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
+ _Boost_CHECK_SPELLING(Boost_ROOT)
+endif()
+unset(_Boost_CMP0074)
_Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
_Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23b3ca5e1f599d05e822b651a09bb8b9e0df6240
commit 23b3ca5e1f599d05e822b651a09bb8b9e0df6240
Merge: 6faa690 49f8351
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 15 09:10:03 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed May 15 09:10:03 2019 -0400
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2019-05-15 (dea11658)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49f8351a1812ea55acd97aca15f72bf677e00fa9
commit 49f8351a1812ea55acd97aca15f72bf677e00fa9
Author: KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Wed May 15 09:08:25 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed May 15 09:09:59 2019 -0400
KWSys 2019-05-15 (dea11658)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit dea11658266eaca24c017670b1b6c6e817afe5be (master).
Upstream Shortlog
-----------------
Fan Jinke (1):
93352b24 SystemInformation: Add Hygon Dhyana Support
Ken Martin (1):
43c6e2fd SystemInformation: Implement backtrace support on Windows
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1302c64..120b5de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -894,6 +894,11 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
IF(KWSYS_USE_SystemInformation)
IF(WIN32)
TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY} ws2_32)
+ # link in dbghelp.dll for symbol lookup if MSVC 1800 or later
+ # Note that the dbghelp runtime is part of MS Windows OS
+ IF(MSVC_VERSION AND NOT MSVC_VERSION VERSION_LESS 1800)
+ TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY} dbghelp)
+ ENDIF()
IF(KWSYS_SYS_HAS_PSAPI)
TARGET_LINK_LIBRARIES(${KWSYS_TARGET_INTERFACE} ${KWSYS_LINK_DEPENDENCY}
Psapi)
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 4354753..7b697c4 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
#if defined(_WIN32)
# define NOMINMAX // use our min,max
+# if !defined(_WIN32_WINNT) && defined(_MSC_VER) && _MSC_VER >= 1800
+# define _WIN32_WINNT 0x0600 // vista
+# endif
# if !defined(_WIN32_WINNT) && !(defined(_MSC_VER) && _MSC_VER < 1300)
# define _WIN32_WINNT 0x0501
# endif
@@ -444,6 +447,7 @@ public:
IBM,
Motorola,
HP,
+ Hygon,
UnknownManufacturer
};
@@ -1766,6 +1770,8 @@ const char* SystemInformationImplementation::GetVendorID()
return "Motorola";
case HP:
return "Hewlett-Packard";
+ case Hygon:
+ return "Chengdu Haiguang IC Design Co., Ltd.";
case UnknownManufacturer:
default:
return "Unknown Manufacturer";
@@ -2117,6 +2123,8 @@ void SystemInformationImplementation::FindManufacturer(
this->ChipManufacturer = AMD; // Advanced Micro Devices
else if (this->ChipID.Vendor == "AMD ISBETTER")
this->ChipManufacturer = AMD; // Advanced Micro Devices (1994)
+ else if (this->ChipID.Vendor == "HygonGenuine")
+ this->ChipManufacturer = Hygon; // Chengdu Haiguang IC Design Co., Ltd.
else if (this->ChipID.Vendor == "CyrixInstead")
this->ChipManufacturer = Cyrix; // Cyrix Corp., VIA Inc.
else if (this->ChipID.Vendor == "NexGenDriven")
@@ -2751,7 +2759,7 @@ bool SystemInformationImplementation::RetrieveExtendedCPUFeatures()
0); // MP Capable -- > Bit 19.
// Retrieve AMD specific extended features.
- if (this->ChipManufacturer == AMD) {
+ if (this->ChipManufacturer == AMD || this->ChipManufacturer == Hygon) {
this->Features.ExtendedFeatures.HasMMXPlus =
((localCPUExtendedFeatures[3] & 0x00400000) !=
0); // AMD specific: MMX-SSE --> Bit 22
@@ -3158,6 +3166,10 @@ bool SystemInformationImplementation::RetrieveClassicalCPUIdentity()
}
break;
+ case Hygon:
+ this->ChipID.ProcessorName = "Unknown Hygon family";
+ return false;
+
case Transmeta:
switch (this->ChipID.Family) {
case 5:
@@ -3880,34 +3892,78 @@ SystemInformation::LongLong SystemInformationImplementation::GetProcessId()
}
/**
+ * Used in GetProgramStack(...) below
+ */
+#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 && defined(_MSC_VER) && \
+ _MSC_VER >= 1800
+# define KWSYS_SYSTEMINFORMATION_HAS_DBGHELP
+# define TRACE_MAX_STACK_FRAMES 1024
+# define TRACE_MAX_FUNCTION_NAME_LENGTH 1024
+# pragma warning(push)
+# pragma warning(disable : 4091) /* 'typedef ': ignored on left of '' */
+# include "dbghelp.h"
+# pragma warning(pop)
+#endif
+
+/**
return current program stack in a string
demangle cxx symbols if possible.
*/
std::string SystemInformationImplementation::GetProgramStack(int firstFrame,
int wholePath)
{
- std::string programStack = ""
-#if !defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
- "WARNING: The stack could not be examined "
- "because backtrace is not supported.\n"
-#elif !defined(KWSYS_SYSTEMINFORMATION_HAS_DEBUG_BUILD)
- "WARNING: The stack trace will not use advanced "
- "capabilities because this is a release build.\n"
+ std::ostringstream oss;
+ std::string programStack = "";
+
+#ifdef KWSYS_SYSTEMINFORMATION_HAS_DBGHELP
+ (void)wholePath;
+
+ void* stack[TRACE_MAX_STACK_FRAMES];
+ HANDLE process = GetCurrentProcess();
+ SymInitialize(process, NULL, TRUE);
+ WORD numberOfFrames =
+ CaptureStackBackTrace(firstFrame, TRACE_MAX_STACK_FRAMES, stack, NULL);
+ SYMBOL_INFO* symbol = static_cast<SYMBOL_INFO*>(
+ malloc(sizeof(SYMBOL_INFO) +
+ (TRACE_MAX_FUNCTION_NAME_LENGTH - 1) * sizeof(TCHAR)));
+ symbol->MaxNameLen = TRACE_MAX_FUNCTION_NAME_LENGTH;
+ symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
+ DWORD displacement;
+ IMAGEHLP_LINE64 line;
+ line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
+ for (int i = 0; i < numberOfFrames; i++) {
+ DWORD64 address = reinterpret_cast<DWORD64>(stack[i]);
+ SymFromAddr(process, address, NULL, symbol);
+ if (SymGetLineFromAddr64(process, address, &displacement, &line)) {
+ oss << " at " << symbol->Name << " in " << line.FileName << " line "
+ << line.LineNumber << std::endl;
+ } else {
+ oss << " at " << symbol->Name << std::endl;
+ }
+ }
+ free(symbol);
+
#else
-# if !defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
- "WARNING: Function names will not be demangled "
- "because "
- "dladdr is not available.\n"
-# endif
-# if !defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
- "WARNING: Function names will not be demangled "
- "because cxxabi is not available.\n"
+ programStack += ""
+# if !defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+ "WARNING: The stack could not be examined "
+ "because backtrace is not supported.\n"
+# elif !defined(KWSYS_SYSTEMINFORMATION_HAS_DEBUG_BUILD)
+ "WARNING: The stack trace will not use advanced "
+ "capabilities because this is a release build.\n"
+# else
+# if !defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
+ "WARNING: Function names will not be demangled "
+ "because dladdr is not available.\n"
+# endif
+# if !defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
+ "WARNING: Function names will not be demangled "
+ "because cxxabi is not available.\n"
+# endif
# endif
-#endif
;
- std::ostringstream oss;
-#if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
void* stackSymbols[256];
int nFrames = backtrace(stackSymbols, 256);
for (int i = firstFrame; i < nFrames; ++i) {
@@ -3916,10 +3972,12 @@ std::string SystemInformationImplementation::GetProgramStack(int firstFrame,
symProps.Initialize(stackSymbols[i]);
oss << symProps << std::endl;
}
-#else
+# else
(void)firstFrame;
(void)wholePath;
+# endif
#endif
+
programStack += oss.str();
return programStack;
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/sunpro-supports-cxx14.rst | 4 ++
Modules/FindBoost.cmake | 6 +-
Source/kwsys/CMakeLists.txt | 5 ++
Source/kwsys/SystemInformation.cxx | 98 ++++++++++++++++++++++++------
4 files changed, 92 insertions(+), 21 deletions(-)
create mode 100644 Help/release/dev/sunpro-supports-cxx14.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list