Update upstream source from tag 'upstream/3.27.8'

Update to upstream version '3.27.8'
with Debian dir 7761c02639
ci/unstable
Timo Röhling 1 year ago
commit 33285ca53a

@ -285,8 +285,8 @@ Changes made since CMake 3.27.0 include the following.
to select the Windows 8.1 SDK. In CMake 3.27.[0-1] the ``version=`` field
was limited to selecting Windows 10 SDKs.
3.27.3, 3.27.4, 3.27.5, 3.27.6, 3.27.7
--------------------------------------
3.27.3, 3.27.4, 3.27.5, 3.27.6, 3.27.7, 3.27.8
----------------------------------------------
* These versions made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes

@ -434,6 +434,8 @@ endfunction()
macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG)
set(OpenMP_SPEC_DATE_MAP
"202111=5.2"
"202011=5.1"
# Preview versions
"201611=5.0" # OpenMP 5.0 preview 1
# Combined versions, 2.5 onwards

@ -730,7 +730,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
if(gp_tool MATCHES "ldd$")
set(gp_cmd_args "")
set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+(/[^\t\(]+)( \(.+\))?${eol_char}$")
set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+([^\t\(]+)( \(.+\))?${eol_char}$")
set(gp_regex_error "not found${eol_char}$")
set(gp_regex_fallback "^[\t ]*([^\t ]+) => ([^\t ]+).*${eol_char}$")
set(gp_regex_cmp_count 1)

@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 27)
set(CMake_VERSION_PATCH 7)
set(CMake_VERSION_PATCH 8)
#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 [==[9532e1cf5b CMake 3.27.7]==])
set(git_info [==[9cfff766eb CMake 3.27.8]==])
# 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]* "

@ -170,15 +170,8 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
cmGlobalCommonGenerator* const gg = this->GlobalCommonGenerator;
if (cmComputeLinkInformation* cli =
this->GeneratorTarget->GetLinkInformation(config)) {
std::vector<cmGeneratorTarget const*> targets;
for (auto const& item : cli->GetItems()) {
targets.push_back(item.Target);
}
for (auto const* target : cli->GetObjectLibrariesLinked()) {
targets.push_back(target);
}
for (auto const* linkee : targets) {
auto addLinkedTarget = [this, &lang, &config, &dirs, &emitted,
gg](cmGeneratorTarget const* linkee) {
if (linkee &&
!linkee->IsImported()
// Skip targets that build after this one in a static lib cycle.
@ -200,6 +193,15 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
}
dirs.push_back(std::move(di));
}
};
for (auto const& item : cli->GetItems()) {
addLinkedTarget(item.Target);
}
for (cmGeneratorTarget const* target : cli->GetObjectLibrariesLinked()) {
addLinkedTarget(target);
}
for (cmGeneratorTarget const* target : cli->GetExternalObjectTargets()) {
addLinkedTarget(target);
}
}
return dirs;

@ -499,6 +499,8 @@ std::pair<size_t, bool> cmComputeLinkDepends::AddLinkEntry(
void cmComputeLinkDepends::AddLinkObject(cmLinkItem const& item)
{
assert(!item.Target); // The item is an object file, not its target.
// Allocate a spot for the item entry.
auto lei = this->AllocateLinkEntry(item);

@ -15,6 +15,7 @@
#include "cmComputeLinkDepends.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLinkItem.h"
#include "cmList.h"
#include "cmListFileCache.h"
#include "cmLocalGenerator.h"
@ -23,6 +24,7 @@
#include "cmOrderDirectories.h"
#include "cmPlaceholderExpander.h"
#include "cmPolicies.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
@ -531,6 +533,12 @@ cmComputeLinkInformation::GetObjectLibrariesLinked() const
return this->ObjectLibrariesLinked;
}
const std::vector<const cmGeneratorTarget*>&
cmComputeLinkInformation::GetExternalObjectTargets() const
{
return this->ExternalObjectTargets;
}
bool cmComputeLinkInformation::Compute()
{
// Skip targets that do not link or have link-like information consumers may
@ -678,6 +686,9 @@ bool cmComputeLinkInformation::Compute()
this->Target->GetBacktrace());
}
// Record targets referenced by $<TARGET_OBJECTS:...> sources.
this->AddExternalObjectTargets();
return true;
}
@ -1052,6 +1063,26 @@ cmComputeLinkInformation::GetGroupFeature(std::string const& feature)
.first->second;
}
void cmComputeLinkInformation::AddExternalObjectTargets()
{
std::vector<cmSourceFile const*> externalObjects;
this->Target->GetExternalObjects(externalObjects, this->Config);
std::set<std::string> emitted;
for (auto const* externalObject : externalObjects) {
std::string const& objLib = externalObject->GetObjectLibrary();
if (objLib.empty()) {
continue;
}
if (emitted.insert(objLib).second) {
cmLinkItem const& objItem =
this->Target->ResolveLinkItem(BT<std::string>(objLib));
if (objItem.Target) {
this->ExternalObjectTargets.emplace_back(objItem.Target);
}
}
}
}
void cmComputeLinkInformation::AddImplicitLinkInfo()
{
// The link closure lists all languages whose implicit info is needed.
@ -1220,7 +1251,7 @@ void cmComputeLinkInformation::AddItem(LinkEntry const& entry)
this->AddFullItem(entry);
this->AddLibraryRuntimeInfo(item.Value);
}
} else {
} else if (entry.Kind != cmComputeLinkDepends::LinkEntry::Object) {
// This is a library or option specified by the user.
this->AddUserItem(entry, true);
}

@ -98,6 +98,8 @@ public:
std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked() const;
std::vector<cmGeneratorTarget const*> const& GetObjectLibrariesLinked()
const;
std::vector<cmGeneratorTarget const*> const& GetExternalObjectTargets()
const;
std::vector<cmGeneratorTarget const*> const& GetRuntimeDLLs() const
{
return this->RuntimeDLLs;
@ -135,6 +137,7 @@ private:
std::vector<std::string> RuntimeSearchPath;
std::set<cmGeneratorTarget const*> SharedLibrariesLinked;
std::vector<cmGeneratorTarget const*> ObjectLibrariesLinked;
std::vector<cmGeneratorTarget const*> ExternalObjectTargets;
std::vector<cmGeneratorTarget const*> RuntimeDLLs;
// Context information.
@ -219,6 +222,8 @@ private:
bool FinishLinkerSearchDirectories();
void PrintLinkPolicyDiagnosis(std::ostream&);
void AddExternalObjectTargets();
// Implicit link libraries and directories for linker language.
void LoadImplicitLinkInfo();
void AddImplicitLinkInfo();

@ -134,3 +134,6 @@ if( # Intel Fortran VS Integration breaks on custom targets with Fortran sources
add_subdirectory(Issue25252-iface-target)
endif()
add_subdirectory(Issue25252-iface-sources)
add_subdirectory(Issue25365-target-objects)
add_subdirectory(Issue25365-target-objects-iface)

@ -0,0 +1,11 @@
enable_language(C)
add_library(fortran_target_objects_sources_iface STATIC "${CMAKE_CURRENT_SOURCE_DIR}/iface.f90")
add_library(fortran_target_objects_sources_iface_bridge INTERFACE)
target_sources(fortran_target_objects_sources_iface_bridge
INTERFACE
"$<TARGET_OBJECTS:fortran_target_objects_sources_iface>")
add_library(lib25365-target-objects-iface lib.f90)
target_link_libraries(lib25365-target-objects-iface PRIVATE fortran_target_objects_sources_iface_bridge)

@ -0,0 +1,11 @@
module m1
implicit none
contains
pure real function pi()
pi = 4*atan(1.)
end function
end module m1

@ -0,0 +1,13 @@
module lib
use m1, only : pi
implicit none
contains
pure real function func()
func = pi()
end function
end module

@ -0,0 +1,5 @@
enable_language(C)
add_library(fortran_target_objects_sources STATIC "${CMAKE_CURRENT_SOURCE_DIR}/iface.f90")
add_library(lib25365-target-objects lib.f90 "$<TARGET_OBJECTS:fortran_target_objects_sources>")

@ -0,0 +1,11 @@
module m1
implicit none
contains
pure real function pi()
pi = 4*atan(1.)
end function
end module m1

@ -0,0 +1,13 @@
module lib
use m1, only : pi
implicit none
contains
pure real function func()
func = pi()
end function
end module

@ -68,7 +68,7 @@ add_library(UseCstaticObjs STATIC $<TARGET_OBJECTS:Cstatic> $<TARGET_OBJECTS:A>
# Test a shared library with sources from a different shared library
add_library(UseCsharedObjs SHARED $<TARGET_OBJECTS:Cshared> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:Bexport>)
# Test a shared executable with sources from a different shared library
# Test a shared executable with sources from a different executable
add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
target_link_libraries(UseABstaticObjs ABstatic)
@ -77,3 +77,5 @@ add_subdirectory(ExportLanguages)
add_subdirectory(LinkObjects)
add_subdirectory(Transitive)
add_subdirectory(TransitiveLinkDeps)

@ -0,0 +1,15 @@
add_library(implgather INTERFACE)
add_library(dep STATIC dep.c)
add_library(deps INTERFACE)
target_link_libraries(deps INTERFACE dep)
add_library(impl_obj OBJECT impl_obj.c)
target_link_libraries(impl_obj PUBLIC deps)
target_sources(implgather INTERFACE "$<TARGET_OBJECTS:impl_obj>")
target_link_libraries(implgather INTERFACE impl_obj)
add_executable(useimpl main.c)
target_link_libraries(useimpl PRIVATE implgather)

@ -0,0 +1,4 @@
int from_dep(void)
{
return 0;
}

@ -0,0 +1,6 @@
int from_dep(void);
int impl_obj(void)
{
return from_dep();
}

@ -0,0 +1,6 @@
int impl_obj(void);
int main(int argc, char* argv[])
{
return impl_obj();
}

@ -588,9 +588,9 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf,
/* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
if(!socks5_resolve_local && hostname_len > 255) {
infof(data, "SOCKS5: server resolving disabled for hostnames of "
"length > 255 [actual len=%zu]", hostname_len);
socks5_resolve_local = TRUE;
failf(data, "SOCKS5: the destination hostname is too long to be "
"resolved remotely by the proxy.");
return CURLPX_LONG_HOSTNAME;
}
if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
@ -904,7 +904,7 @@ CONNECT_RESOLVE_REMOTE:
}
else {
socksreq[len++] = 3;
socksreq[len++] = (char) hostname_len; /* one byte address length */
socksreq[len++] = (unsigned char) hostname_len; /* one byte length */
memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */
len += hostname_len;
}

Loading…
Cancel
Save