summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-17 14:51:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-01-17 14:51:13 (GMT)
commitc7ebec770f19faa7b16df280a1f4804fa98b1011 (patch)
treec0365813927729946bbdfac9029964b64e423c36
parent094648fa7316be8040c23bcb150edc78d8af35c9 (diff)
parent202f4b316139dcb00dc057bc4fcc85b00b8a62cb (diff)
downloadCMake-c7ebec770f19faa7b16df280a1f4804fa98b1011.zip
CMake-c7ebec770f19faa7b16df280a1f4804fa98b1011.tar.gz
CMake-c7ebec770f19faa7b16df280a1f4804fa98b1011.tar.bz2
Merge topic 'lcc-updates-2024-01'
202f4b3161 Tests: Exclude some tests on broken libc on Elbrus 9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21 1dbb31cea2 libarchive: avoid lchmod not implemented warning on old LCC 83af26d9ad LCC: Don't enable debugger on LCC that don't have <future> fa764ce311 liblzma: Make cmliblzma buildable on LCC 1.21 77e046b47c jsoncpp: fix missing template deletion support on LCC < 1.23 67de0c197b cmcurl: fix X509_STORE_up_ref issue not just on LCC 1.23, but on LCC <= 1.23 9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9157
-rw-r--r--CMakeLists.txt1
-rw-r--r--Modules/Compiler/LCC-C.cmake2
-rw-r--r--Source/cmConfigure.cmake.h.in7
-rw-r--r--Source/cmDebuggerExceptionManager.cxx2
-rw-r--r--Source/cmSystemTools.cxx4
-rw-r--r--Tests/RunCMake/CMakeLists.txt14
-rw-r--r--Utilities/cmcppdap/include/dap/any.h2
-rw-r--r--Utilities/cmcurl/lib/vtls/openssl.c6
-rw-r--r--Utilities/cmjsoncpp/include/json/value.h4
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt4
-rw-r--r--Utilities/cmliblzma/common/sysdefs.h4
11 files changed, 33 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a99cf50..dfbb38d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,6 +140,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
if(CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin|Linux|BSD|DragonFly|CYGWIN|MSYS"
AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.16)
AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.1)
+ AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "LCC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1.23)
)
set(CMake_ENABLE_DEBUGGER 1)
else()
diff --git a/Modules/Compiler/LCC-C.cmake b/Modules/Compiler/LCC-C.cmake
index 99f791f..52c3bf3 100644
--- a/Modules/Compiler/LCC-C.cmake
+++ b/Modules/Compiler/LCC-C.cmake
@@ -33,4 +33,4 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 1.26)
set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
endif()
-__compiler_check_default_language_standard(C 1.23 90 1.20 11 1.26 17)
+__compiler_check_default_language_standard(C 1.17 89 1.23 99 1.26 17)
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index de74716..23e4846 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -14,8 +14,13 @@
#pragma warning(disable : 1572) /* floating-point equality test */
#endif
-#if defined(__LCC__) && defined(__EDG__) && (__LCC__ == 123)
+#if defined(__LCC__) && defined(__EDG__)
+#if __LCC__ == 123
#pragma diag_suppress 2910 /* excess -Wunused-function in 1.23.x */
+#elif __LCC__ == 121
+#pragma diag_suppress 2727 /* excess -Wunused-function in 1.21.x */
+#include <limits.h> /* ..._MIN, ..._MAX constants */
+#endif
#endif
#cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE
diff --git a/Source/cmDebuggerExceptionManager.cxx b/Source/cmDebuggerExceptionManager.cxx
index a27426c..470e44c 100644
--- a/Source/cmDebuggerExceptionManager.cxx
+++ b/Source/cmDebuggerExceptionManager.cxx
@@ -78,7 +78,7 @@ cmDebuggerExceptionManager::HandleExceptionInfoRequest()
response.exceptionId = TheException->Id;
response.breakMode = "always";
response.description = TheException->Description;
- TheException = {};
+ TheException = cm::nullopt;
}
return response;
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f606c22..1b3dbe2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1673,7 +1673,7 @@ void cmSystemTools::EnvDiff::PutEnv(const std::string& env)
void cmSystemTools::EnvDiff::UnPutEnv(const std::string& env)
{
- diff[env] = {};
+ diff[env] = cm::nullopt;
}
bool cmSystemTools::EnvDiff::ParseOperation(const std::string& envmod)
@@ -1728,7 +1728,7 @@ bool cmSystemTools::EnvDiff::ParseOperation(const std::string& envmod)
} else if (op == "set"_s) {
diff[name] = value;
} else if (op == "unset"_s) {
- diff[name] = {};
+ diff[name] = cm::nullopt;
} else if (op == "string_append"_s) {
apply_diff(name, [&value](std::string& output) { output += value; });
} else if (op == "string_prepend"_s) {
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 0399e74..ef088aa 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -1058,6 +1058,10 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" AND NOT DEFINED CMake_TEST_E2K_BROKEN_L
execute_process(COMMAND "${DPKG_QUERY}" "-f" "\${Version}" "-W" "glibc" OUTPUT_VARIABLE LIBC_VERSION)
if(LIBC_VERSION MATCHES "2.29-25.*")
list(REMOVE_ITEM cpack_tests
+ DEB.DEFAULT_PERMISSIONS
+ DEB.DEBUGINFO
+ DEB.MINIMAL
+ DEB.PER_COMPONENT_FIELDS
DEB.AUTO_SUFFIXES
DEB.CUSTOM_NAMES
DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY
@@ -1125,12 +1129,12 @@ add_RunCMake_test(CMakePresets
-DPython_EXECUTABLE=${Python_EXECUTABLE}
-DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}
)
-add_RunCMake_test(CMakePresetsBuild
- -DPython_EXECUTABLE=${Python_EXECUTABLE}
- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}
- -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
- )
if(NOT CMake_TEST_E2K_BROKEN_LIBC)
+ add_RunCMake_test(CMakePresetsBuild
+ -DPython_EXECUTABLE=${Python_EXECUTABLE}
+ -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}
+ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
+ )
add_RunCMake_test(CMakePresetsTest
-DPython_EXECUTABLE=${Python_EXECUTABLE}
-DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}
diff --git a/Utilities/cmcppdap/include/dap/any.h b/Utilities/cmcppdap/include/dap/any.h
index b05f03d..6060546 100644
--- a/Utilities/cmcppdap/include/dap/any.h
+++ b/Utilities/cmcppdap/include/dap/any.h
@@ -159,7 +159,7 @@ any& any::operator=(const std::nullptr_t&) {
template <typename T>
T& any::get() const {
- static_assert(!std::is_same<T, std::nullptr_t>(),
+ static_assert(!std::is_same<T, std::nullptr_t>::value,
"Cannot get nullptr from 'any'.");
assert(is<T>());
return *reinterpret_cast<T*>(value);
diff --git a/Utilities/cmcurl/lib/vtls/openssl.c b/Utilities/cmcurl/lib/vtls/openssl.c
index ca6d931..4bcb340 100644
--- a/Utilities/cmcurl/lib/vtls/openssl.c
+++ b/Utilities/cmcurl/lib/vtls/openssl.c
@@ -293,9 +293,9 @@ typedef unsigned long sslerr_t;
#define HAVE_SSL_X509_STORE_SHARE
#endif
-/* FIXME: On a specific machine using LCC 1.23, OpenSSL 2.0.0
- * is found but does not seem to have X509_STORE_up_ref. */
-#if defined(__LCC__) && defined(__EDG__) && (__LCC__ == 123)
+/* FIXME: On LCC <= 1.23, OpenSSL 2.0.0 may be
+ * found but does not seem to have X509_STORE_up_ref. */
+#if defined(__LCC__) && defined(__EDG__) && (__LCC__ <= 123)
#undef HAVE_SSL_X509_STORE_SHARE
#endif
diff --git a/Utilities/cmjsoncpp/include/json/value.h b/Utilities/cmjsoncpp/include/json/value.h
index f6ac9e3..421fef8 100644
--- a/Utilities/cmjsoncpp/include/json/value.h
+++ b/Utilities/cmjsoncpp/include/json/value.h
@@ -33,6 +33,10 @@
#if __clang_major__ == 3 && __clang_minor__ <= 8
#define JSONCPP_TEMPLATE_DELETE
#endif
+#elif defined(__EDG__) && defined(__LCC__)
+#if __LCC__ < 123
+#define JSONCPP_TEMPLATE_DELETE
+#endif
#endif
#if !defined(JSONCPP_TEMPLATE_DELETE)
#define JSONCPP_TEMPLATE_DELETE = delete
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 1237608..e47184b 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -1425,7 +1425,9 @@ CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID)
CHECK_FUNCTION_EXISTS_GLIBC(getvfsbyname HAVE_GETVFSBYNAME)
CHECK_FUNCTION_EXISTS_GLIBC(gmtime_r HAVE_GMTIME_R)
CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS)
-CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
+if(NOT CMAKE_C_COMPILER_ID STREQUAL "LCC" OR NOT CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL "1.23")
+ CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
+endif()
CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK)
CHECK_FUNCTION_EXISTS_GLIBC(linkat HAVE_LINKAT)
diff --git a/Utilities/cmliblzma/common/sysdefs.h b/Utilities/cmliblzma/common/sysdefs.h
index 86c5da0..6e3495e 100644
--- a/Utilities/cmliblzma/common/sysdefs.h
+++ b/Utilities/cmliblzma/common/sysdefs.h
@@ -172,9 +172,9 @@ typedef unsigned char _Bool;
# include <memory.h>
#endif
-// As of MSVC 2013, inline and restrict are supported with
+// As of MSVC 2013 and LCC <= 1.21, inline and restrict are supported with
// non-standard keywords.
-#if defined(_WIN32) && defined(_MSC_VER)
+#if (defined(_WIN32) && defined(_MSC_VER)) || (defined(__EDG__) && defined(__LCC__))
# ifndef inline
# define inline __inline
# endif