New upstream version 3.30.3

ci/unstable
Timo Röhling 4 months ago
parent cf6a15e3ec
commit c62c0b62a8

@ -231,8 +231,8 @@ Changes made since CMake 3.29.0 include the following.
to ``perMachine`` on their own schedule by setting
``CPACK_WIX_INSTALL_SCOPE``.
3.29.6, 3.29.7
--------------
3.29.6, 3.29.7, 3.29.8
----------------------
* These versions made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes

@ -254,3 +254,12 @@ Changes made since CMake 3.30.0 include the following.
* These versions made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes
and/or fix regressions.
3.30.3
------
* The :module:`FindPython` and :module:`FindPython3` modules now define,
respectively, the ``Python_DEFINITIONS`` and ``Python3_DEFINITIONS``
variables on Windows to support development with the free threaded
version of Python. The :prop_tgt:`INTERFACE_COMPILE_DEFINITIONS` target
property is also defined for the various targets provided by these modules.

@ -343,7 +343,9 @@ foreach(dir IN LISTS JAVA_AWT_LIBRARY_DIRECTORIES)
list(APPEND JAVA_JVM_LIBRARY_DIRECTORIES
"${dir}"
"${dir}/client"
"${dir}/minimal"
"${dir}/server"
"${dir}/zero"
# IBM SDK, Java Technology Edition, specific paths
"${dir}/j9vm"
"${dir}/default"
@ -389,8 +391,10 @@ if(APPLE)
execute_process(
COMMAND xcodebuild -version
OUTPUT_VARIABLE _FindJNI_XCODEBUILD_VERSION
ERROR_VARIABLE _FindJNI_XCODEBUILD_VERSION
RESULT_VARIABLE _FindJNI_XCODEBUILD_RESULT
)
if(_FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
if(_FindJNI_XCODEBUILD_RESULT EQUAL 0 AND _FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
set(_FindJNI_XCODE_VERSION "${CMAKE_MATCH_1}")
else()
set(_FindJNI_XCODE_VERSION "")

@ -224,6 +224,11 @@ This module will set the following variables in your project
The Python include directories.
``Python_DEFINITIONS``
.. versionadded:: 3.30.3
The Python preprocessor definitions.
``Python_DEBUG_POSTFIX``
.. versionadded.. 3.30

@ -3740,6 +3740,14 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
_${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE
_${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG)
endif()
if (WIN32 AND _${_PYTHON_PREFIX}_LIBRARY_RELEASE MATCHES "t${CMAKE_IMPORT_LIBRARY_SUFFIX}$")
# On windows, header file is shared between the different implementations
# So Py_GIL_DISABLED should be set explicitly
set (${_PYTHON_PREFIX}_DEFINITIONS Py_GIL_DISABLED=1)
else()
unset (${_PYTHON_PREFIX}_DEFINITIONS)
endif()
endif()
if ("SABI_LIBRARY" IN_LIST _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_ARTIFACTS)
@ -3769,6 +3777,14 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
_${_PYTHON_PREFIX}_RUNTIME_SABI_LIBRARY_RELEASE
_${_PYTHON_PREFIX}_RUNTIME_SABI_LIBRARY_DEBUG)
endif()
if (WIN32 AND _${_PYTHON_PREFIX}_SABI_LIBRARY_RELEASE MATCHES "t${CMAKE_IMPORT_LIBRARY_SUFFIX}$")
# On windows, header file is shared between the different implementations
# So Py_GIL_DISABLED should be set explicitly
set (${_PYTHON_PREFIX}_DEFINITIONS Py_GIL_DISABLED=1)
else()
unset (${_PYTHON_PREFIX}_DEFINITIONS)
endif()
endif()
if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE OR _${_PYTHON_PREFIX}_SABI_LIBRARY_RELEASE OR _${_PYTHON_PREFIX}_INCLUDE_DIR)
@ -3903,11 +3919,12 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte
# Workaround Intel MKL library outputting a message in stdout, which cause
# incorrect detection of numpy.get_include() and numpy.__version__
# See https://github.com/numpy/numpy/issues/23775
if(DEFINED ENV{MKL_ENABLE_INSTRUCTIONS})
set(_${_PYTHON_PREFIX}_BACKUP_ENV_VAR_MKL_ENABLE_INSTRUCTIONS ENV{MKL_ENABLE_INSTRUCTIONS})
# See https://github.com/numpy/numpy/issues/23775 and
# https://gitlab.kitware.com/cmake/cmake/-/issues/26240
if(NOT DEFINED ENV{MKL_ENABLE_INSTRUCTIONS})
set(_${_PYTHON_PREFIX}_UNSET_ENV_VAR_MKL_ENABLE_INSTRUCTIONS YES)
set(ENV{MKL_ENABLE_INSTRUCTIONS} "SSE4_2")
endif()
set(ENV{MKL_ENABLE_INSTRUCTIONS} "SSE4_2")
if (NOT _${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR)
execute_process(COMMAND ${${_PYTHON_PREFIX}_INTERPRETER_LAUNCHER} "${_${_PYTHON_PREFIX}_EXECUTABLE}" -c
@ -3949,11 +3966,9 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte
set (${_PYTHON_PREFIX}_NumPy_FOUND FALSE)
endif()
# Restore previous value of MKL_ENABLE_INSTRUCTIONS
if(DEFINED _${_PYTHON_PREFIX}_BACKUP_ENV_VAR_MKL_ENABLE_INSTRUCTIONS)
set(ENV{MKL_ENABLE_INSTRUCTIONS} ${_${_PYTHON_PREFIX}_BACKUP_ENV_VAR_MKL_ENABLE_INSTRUCTIONS})
unset(_${_PYTHON_PREFIX}_BACKUP_ENV_VAR_MKL_ENABLE_INSTRUCTIONS)
else()
# Unset MKL_ENABLE_INSTRUCTIONS if set by us
if(DEFINED _${_PYTHON_PREFIX}_UNSET_ENV_VAR_MKL_ENABLE_INSTRUCTIONS)
unset(_${_PYTHON_PREFIX}_UNSET_ENV_VAR_MKL_ENABLE_INSTRUCTIONS)
unset(ENV{MKL_ENABLE_INSTRUCTIONS})
endif()
@ -4067,6 +4082,12 @@ if(_${_PYTHON_PREFIX}_CMAKE_ROLE STREQUAL "PROJECT")
set_property (TARGET ${__name}
PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${_PYTHON_PREFIX}_INCLUDE_DIRS}")
if (${_PYTHON_PREFIX}_DEFINITIONS)
set_property (TARGET ${__name}
PROPERTY INTERFACE_COMPILE_DEFINITIONS "${${_PYTHON_PREFIX}_DEFINITIONS}")
endif()
if (${_PYTHON_PREFIX}_${_PREFIX}LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_RUNTIME_${_PREFIX}LIBRARY_RELEASE)
# System manage shared libraries in two parts: import and runtime
if (${_PYTHON_PREFIX}_${_PREFIX}LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_${_PREFIX}LIBRARY_DEBUG)
@ -4123,6 +4144,11 @@ if(_${_PYTHON_PREFIX}_CMAKE_ROLE STREQUAL "PROJECT")
set_property (TARGET ${__name}
PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${_PYTHON_PREFIX}_INCLUDE_DIRS}")
if (${_PYTHON_PREFIX}_DEFINITIONS)
set_property (TARGET ${__name}
PROPERTY INTERFACE_COMPILE_DEFINITIONS "${${_PYTHON_PREFIX}_DEFINITIONS}")
endif()
# When available, enforce shared library generation with undefined symbols
if (APPLE)
set_property (TARGET ${__name}

@ -226,6 +226,11 @@ This module will set the following variables in your project
The Python 3 include directories.
``Python3_DEFINITIONS``
.. versionadded:: 3.30.3
The Python 3 preprocessor definitions.
``Python3_DEBUG_POSTFIX``
.. versionadded.. 3.30

@ -375,21 +375,21 @@ endif()
if(CMAKE_ANDROID_ARCH_ABI AND NOT DEFINED "NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC")
message(FATAL_ERROR "Android: Unknown ABI CMAKE_ANDROID_ARCH_ABI='${CMAKE_ANDROID_ARCH_ABI}'.")
endif()
if(CMAKE_SYSTEM_PROCESSOR AND NOT DEFINED "NDK_PROC_${CMAKE_SYSTEM_PROCESSOR}_ABI")
message(FATAL_ERROR "Android: Unknown processor CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}'.")
endif()
if(_ANDROID_SYSROOT_ARCH AND NOT DEFINED "NDK_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI")
message(FATAL_ERROR
"Android: Unknown architecture '${_ANDROID_SYSROOT_ARCH}' specified in CMAKE_SYSROOT:\n"
" ${CMAKE_SYSROOT}"
)
endif()
# Select an ABI.
if(NOT CMAKE_ANDROID_ARCH_ABI)
if(CMAKE_SYSTEM_PROCESSOR)
if(NOT DEFINED "NDK_PROC_${CMAKE_SYSTEM_PROCESSOR}_ABI")
message(FATAL_ERROR "Android: Unknown processor CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}'.")
endif()
set(CMAKE_ANDROID_ARCH_ABI "${NDK_PROC_${CMAKE_SYSTEM_PROCESSOR}_ABI}")
elseif(_ANDROID_SYSROOT_ARCH)
if(NOT DEFINED "NDK_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI")
message(FATAL_ERROR
"Android: Unknown architecture '${_ANDROID_SYSROOT_ARCH}' specified in CMAKE_SYSROOT:\n"
" ${CMAKE_SYSROOT}"
)
endif()
set(CMAKE_ANDROID_ARCH_ABI "${NDK_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI}")
elseif(_INCLUDED_ABIS)
# Default to the oldest ARM ABI.

@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 30)
set(CMake_VERSION_PATCH 2)
set(CMake_VERSION_PATCH 3)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
set(git_info [==[d88682dff6 CMake 3.30.2]==])
set(git_info [==[3cc9cb6ee2 CMake 3.30.3]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "

@ -1552,6 +1552,7 @@ std::string cmCPackGenerator::GetSanitizedDirOrFileName(
#ifdef _WIN32
// Given name matches a reserved name (on Windows)?
// Then return it prepended with an underscore.
// See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
cmsys::RegularExpression reserved_pattern("^("
"[Cc][Oo][Nn]|"
"[Pp][Rr][Nn]|"
@ -1559,7 +1560,7 @@ std::string cmCPackGenerator::GetSanitizedDirOrFileName(
"[Nn][Uu][Ll]|"
"[Cc][Oo][Mm][1-9]|"
"[Ll][Pp][Tt][1-9]"
")([.].+)?");
")[.]?$");
if (reserved_pattern.find(name)) {
return "_" + name;
}

@ -863,8 +863,8 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
/* clang-format on */
componentCode += out.str();
} else {
componentCode +=
" File /r \"${INST_DIR}\\" + component->Name + "\\*.*\"\n";
componentCode += " File /r \"${INST_DIR}\\" +
this->GetSanitizedDirOrFileName(component->Name) + "\\*.*\"\n";
}
componentCode += "SectionEnd\n";

@ -22,7 +22,7 @@ cmCTestCurl::cmCTestCurl(cmCTest* ctest)
cmCurlInitOnce();
// In windows, this will init the winsock stuff
::curl_global_init(CURL_GLOBAL_ALL);
this->Curl = curl_easy_init();
this->Curl = cm_curl_easy_init();
}
cmCTestCurl::~cmCTestCurl()

@ -177,7 +177,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
cmCTestCurlOpts curlOpts(this->CTest);
for (std::string const& file : files) {
/* get a curl handle */
curl = curl_easy_init();
curl = cm_curl_easy_init();
if (curl) {
cmCurlSetCAInfo(curl);
if (curlOpts.TLSVersionOpt) {

@ -226,3 +226,15 @@ std::string cmCurlFixFileURL(std::string url)
return url;
}
::CURL* cm_curl_easy_init()
{
::CURL* curl = curl_easy_init();
if (curl_version_info_data* cv = curl_version_info(CURLVERSION_FIRST)) {
// curl 8.7.x returns incorrect HTTP/2 error codes.
if (cv->version_num >= 0x080700 && cv->version_num < 0x080800) {
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
}
}
return curl;
}

@ -18,3 +18,5 @@ std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile = {});
std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
const std::string& netrc_file);
std::string cmCurlFixFileURL(std::string url);
::CURL* cm_curl_easy_init();

@ -2117,7 +2117,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
::CURL* curl;
cmCurlInitOnce();
::curl_global_init(CURL_GLOBAL_DEFAULT);
curl = ::curl_easy_init();
curl = cm_curl_easy_init();
if (!curl) {
status.SetError("DOWNLOAD error initializing curl.");
return false;
@ -2131,7 +2131,10 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
check_curl_result(res, "DOWNLOAD cannot set http failure option: ");
res = ::curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/" LIBCURL_VERSION);
curl_version_info_data* cv = curl_version_info(CURLVERSION_FIRST);
res = ::curl_easy_setopt(
curl, CURLOPT_USERAGENT,
cmStrCat("curl/", cv ? cv->version : LIBCURL_VERSION).c_str());
check_curl_result(res, "DOWNLOAD cannot set user agent option: ");
res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToFileCallback);
@ -2491,7 +2494,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
::CURL* curl;
cmCurlInitOnce();
::curl_global_init(CURL_GLOBAL_DEFAULT);
curl = ::curl_easy_init();
curl = cm_curl_easy_init();
if (!curl) {
status.SetError("UPLOAD error initializing curl.");
fclose(fin);

@ -59,9 +59,14 @@ bool cmProjectCommand(std::vector<std::string> const& args,
mf.AddCacheDefinition(projectName + "_BINARY_DIR",
mf.GetCurrentBinaryDirectory(),
"Value Computed by CMake", cmStateEnums::STATIC);
mf.AddDefinition(projectName + "_BINARY_DIR",
mf.GetCurrentBinaryDirectory());
mf.AddCacheDefinition(projectName + "_SOURCE_DIR",
mf.GetCurrentSourceDirectory(),
"Value Computed by CMake", cmStateEnums::STATIC);
mf.AddDefinition(projectName + "_SOURCE_DIR",
mf.GetCurrentSourceDirectory());
mf.AddDefinition("PROJECT_BINARY_DIR", mf.GetCurrentBinaryDirectory());
mf.AddDefinition("PROJECT_SOURCE_DIR", mf.GetCurrentSourceDirectory());
@ -72,6 +77,8 @@ bool cmProjectCommand(std::vector<std::string> const& args,
mf.AddCacheDefinition(projectName + "_IS_TOP_LEVEL",
mf.IsRootMakefile() ? "ON" : "OFF",
"Value Computed by CMake", cmStateEnums::STATIC);
mf.AddDefinition(projectName + "_IS_TOP_LEVEL",
mf.IsRootMakefile() ? "ON" : "OFF");
// Set the CMAKE_PROJECT_NAME variable to be the highest-level
// project name in the tree. If there are two project commands

@ -10,6 +10,26 @@ install(TARGETS hello
LIBRARY DESTINATION .
BUNDLE DESTINATION .)
# Component that is a reserved name on Windows.
# See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
install(
DIRECTORY .
DESTINATION txt
COMPONENT CON
FILES_MATCHING PATTERN *.txt)
# Component name that is similar to a reserved name on Windows.
install(
DIRECTORY .
DESTINATION txt
COMPONENT Console
FILES_MATCHING PATTERN *.txt)
# Component name that is strongly discouraged on Windows.
install(
DIRECTORY .
DESTINATION txt
COMPONENT EndsWithDot.
FILES_MATCHING PATTERN *.txt)
set(CPACK_NSIS_MUI_HEADERIMAGE "${PROJECT_SOURCE_DIR}\\\\header-image.bmp")
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\header-icon.bmp")
set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}\\\\install.ico")

@ -69,3 +69,24 @@ if("${output_index}" EQUAL "-1")
else()
message(FATAL_ERROR "License found in the project")
endif()
file(STRINGS "${project_file}" line REGEX [[\\_CON\\]])
string(FIND "${line}" [[\_CON\]] output_index)
message(STATUS "Found CON component reserved directory name as _CON")
if("${output_index}" EQUAL "-1")
message(FATAL_ERROR "CON component reserved directory name not found as _CON in the project")
endif()
file(STRINGS "${project_file}" line REGEX [[\\Console\\]])
string(FIND "${line}" [[\Console\]] output_index)
message(STATUS "Found Console component directory name as Console")
if("${output_index}" EQUAL "-1")
message(FATAL_ERROR "Console component directory name not found as Console in the project")
endif()
file(STRINGS "${project_file}" line REGEX [[\\EndsWithDot._\\]])
string(FIND "${line}" [[\EndsWithDot._\]] output_index)
message(STATUS "Found EndsWithDot. component directory name as EndsWithDot._")
if("${output_index}" EQUAL "-1")
message(FATAL_ERROR "EndsWithDot. component directory name not found as EndsWithDot._ in the project")
endif()

@ -0,0 +1,11 @@
cmake_policy(SET CMP0126 NEW)
set(example_SOURCE_DIR "bad/path")
set(example_BINARY_DIR "bad/path")
project(example LANGUAGES)
if(NOT "${example_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
message(FATAL_ERROR "example_SOURCE_DIR not set to expected value")
endif()
if(NOT "${example_BINARY_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "example_BINARY_DIR not set to expected value")
endif()

@ -33,6 +33,7 @@ run_cmake(LanguagesUnordered)
if(RunCMake_GENERATOR MATCHES "Make|Ninja")
run_cmake(LanguagesUsedButNotEnabled)
endif()
run_cmake(ProjectCMP0126)
run_cmake(ProjectDescription)
run_cmake(ProjectDescription2)
run_cmake(ProjectDescriptionNoArg)

@ -17,6 +17,7 @@
#include <functional>
#include <memory>
#include <stdint.h>
namespace dap {
class ReaderWriter;

Loading…
Cancel
Save