summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-26 16:10:01 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-26 16:10:23 (GMT)
commit865e266a14a3dbadfee0d518173fd251aa0a1f31 (patch)
treee1dc1f7643638b0e1883e0811e841707d7de18dc
parent0d987bbd88f2da12b0c7920f662733d6d290a099 (diff)
parent4977184128ee0d9c3faa30943f79d47a419cf346 (diff)
downloadCMake-865e266a14a3dbadfee0d518173fd251aa0a1f31.zip
CMake-865e266a14a3dbadfee0d518173fd251aa0a1f31.tar.gz
CMake-865e266a14a3dbadfee0d518173fd251aa0a1f31.tar.bz2
Merge topic 'update-kwsys'
4977184128 Merge branch 'upstream-KWSys' into update-kwsys 7fc3f7001a KWSys 2021-07-26 (d5fd6ca2) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6391
-rw-r--r--Source/kwsys/CMakeLists.txt4
-rw-r--r--Source/kwsys/SystemTools.cxx6
2 files changed, 6 insertions, 4 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index ef615b3..7da5971 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -46,6 +46,8 @@
# Set to empty string to use no default value.
# KWSYS_CXX_COMPILE_FEATURES = target_compile_features arguments for KWSys.
#
+# KWSYS_NO_EXECINFO = Do not use execinfo.
+#
# Optional settings to setup install rules are as follows:
#
# KWSYS_INSTALL_BIN_DIR = The installation target directories into
@@ -526,7 +528,7 @@ if(KWSYS_USE_SystemInformation)
set_property(SOURCE SystemInformation.cxx APPEND PROPERTY
COMPILE_DEFINITIONS KWSYS_CXX_HAS_RLIMIT64=1)
endif()
- if(UNIX)
+ if(UNIX AND NOT KWSYS_NO_EXECINFO)
include(CheckIncludeFileCXX)
# check for simple stack trace
# usually it's in libc but on FreeBSD
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 006495d..7c26974 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -4360,7 +4360,7 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
# endif
bOsVersionInfoEx = GetVersionExA((OSVERSIONINFOA*)&osvi);
if (!bOsVersionInfoEx) {
- return 0;
+ return "";
}
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# ifdef __clang__
@@ -4499,14 +4499,14 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions",
0, KEY_QUERY_VALUE, &hKey);
if (lRet != ERROR_SUCCESS) {
- return 0;
+ return "";
}
lRet = RegQueryValueExW(hKey, L"ProductType", nullptr, nullptr,
(LPBYTE)szProductType, &dwBufLen);
if ((lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE)) {
- return 0;
+ return "";
}
RegCloseKey(hKey);