Update upstream source from tag 'upstream/3.27.1'

Update to upstream version '3.27.1'
with Debian dir f3bc239597
ci/unstable
Timo Röhling 1 year ago
commit 949cc2ec29

@ -175,8 +175,8 @@ Updates
Changes made since CMake 3.26.0 include the following.
3.26.1, 3.26.2, 3.26.3, 3.26.4
------------------------------
3.26.1, 3.26.2, 3.26.3, 3.26.4, 3.26.5
--------------------------------------
* These versions made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes

@ -256,3 +256,15 @@ Other Changes
* :ref:`Visual Studio Generators`, for VS 15.8 (2017) and newer, now
build custom commands in parallel. See policy :policy:`CMP0147`.
Updates
=======
Changes made since CMake 3.27.0 include the following.
3.27.1
------
* This version made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes
and/or fix regressions.

@ -1200,7 +1200,7 @@ if(CUDAToolkit_FOUND)
endif()
endif()
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins ALT nvrtc-builtins DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvrtc DEPS nvrtc_builtins nvJitLink)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0)
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins_static ALT nvrtc-builtins_static DEPS cuda_driver)

@ -230,7 +230,7 @@ else()
set(_OPENSSL_FIND_PATH_SUFFIX "include")
endif()
if ((DEFINED OPENSSL_ROOT_DIR) OR (DEFINED ENV{OPENSSL_ROOT_DIR}))
if (OPENSSL_ROOT_DIR OR NOT "$ENV{OPENSSL_ROOT_DIR}" STREQUAL "")
set(_OPENSSL_ROOT_HINTS HINTS ${OPENSSL_ROOT_DIR} ENV OPENSSL_ROOT_DIR)
set(_OPENSSL_ROOT_PATHS NO_DEFAULT_PATH)
elseif (MSVC)

@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 27)
set(CMake_VERSION_PATCH 0)
set(CMake_VERSION_PATCH 1)
#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 [==[784596bd08 CMake 3.27.0]==])
set(git_info [==[b5c54d9c8a CMake 3.27.1]==])
# 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]* "

@ -758,11 +758,13 @@ bool cmCTestRunTest::ForkProcess()
}
// An explicit TIMEOUT=0 test property means "no timeout".
if (timeout && *timeout == std::chrono::duration<double>::zero()) {
if (timeout) {
if (*timeout == std::chrono::duration<double>::zero()) {
timeout = cm::nullopt;
}
} else {
// Check --timeout.
if (!timeout && this->CTest->GetGlobalTimeout() > cmDuration::zero()) {
if (this->CTest->GetGlobalTimeout() > cmDuration::zero()) {
timeout = this->CTest->GetGlobalTimeout();
}

@ -143,7 +143,6 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
const std::string& remoteprefix, const std::string& url)
{
CURL* curl;
CURLcode res;
FILE* ftpfile;
char error_buffer[1024];
// Set Content-Type to satisfy fussy modsecurity rules.
@ -211,8 +210,6 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
if (this->CTest->ShouldUseHTTP10()) {
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
}
// enable HTTP ERROR parsing
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
/* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
@ -286,7 +283,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
upload_as += "&MD5=";
if (cmIsOn(this->GetOption("InternalTest"))) {
upload_as += "bad_md5sum";
upload_as += "ffffffffffffffffffffffffffffffff";
} else {
upload_as +=
cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5);
@ -338,7 +335,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &chunkDebug);
// Now run off and do what you've been told!
res = ::curl_easy_perform(curl);
::curl_easy_perform(curl);
if (!chunk.empty()) {
cmCTestOptionalLog(this->CTest, DEBUG,
@ -359,7 +356,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
// If curl failed for any reason, or checksum fails, wait and retry
//
if (res != CURLE_OK || this->HasErrors) {
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
bool successful_submission = response_code == 200;
if (!successful_submission || this->HasErrors) {
std::string retryDelay = *this->GetOption("RetryDelay");
std::string retryCount = *this->GetOption("RetryCount");
@ -397,7 +398,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
chunkDebug.clear();
this->HasErrors = false;
res = ::curl_easy_perform(curl);
::curl_easy_perform(curl);
if (!chunk.empty()) {
cmCTestOptionalLog(this->CTest, DEBUG,
@ -408,14 +409,16 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
this->ParseResponse(chunk);
}
if (res == CURLE_OK && !this->HasErrors) {
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
if (response_code == 200 && !this->HasErrors) {
successful_submission = true;
break;
}
}
}
fclose(ftpfile);
if (res) {
if (!successful_submission) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Error when uploading file: " << local_file
<< std::endl);

@ -170,9 +170,15 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
cmGlobalCommonGenerator* const gg = this->GlobalCommonGenerator;
if (cmComputeLinkInformation* cli =
this->GeneratorTarget->GetLinkInformation(config)) {
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
for (auto const& item : items) {
cmGeneratorTarget const* linkee = item.Target;
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) {
if (linkee &&
!linkee->IsImported()
// Skip targets that build after this one in a static lib cycle.

@ -525,6 +525,12 @@ cmComputeLinkInformation::GetSharedLibrariesLinked() const
return this->SharedLibrariesLinked;
}
const std::vector<const cmGeneratorTarget*>&
cmComputeLinkInformation::GetObjectLibrariesLinked() const
{
return this->ObjectLibrariesLinked;
}
bool cmComputeLinkInformation::Compute()
{
// Skip targets that do not link.
@ -1147,8 +1153,12 @@ void cmComputeLinkInformation::AddItem(LinkEntry const& entry)
this->AddItem(BT<std::string>(libName, item.Backtrace));
}
} else if (tgt->GetType() == cmStateEnums::OBJECT_LIBRARY) {
if (!tgt->HaveCxx20ModuleSources() && !tgt->HaveFortranSources(config)) {
// Ignore object library!
// Its object-files should already have been extracted for linking.
} else {
this->ObjectLibrariesLinked.push_back(entry.Target);
}
} else {
// Decide whether to use an import library.
cmStateEnums::ArtifactType artifact = tgt->HasImportLibrary(config)

@ -96,6 +96,8 @@ public:
std::string GetRPathString(bool for_install) const;
std::string GetChrpathString() const;
std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked() const;
std::vector<cmGeneratorTarget const*> const& GetObjectLibrariesLinked()
const;
std::vector<cmGeneratorTarget const*> const& GetRuntimeDLLs() const
{
return this->RuntimeDLLs;
@ -132,6 +134,7 @@ private:
std::vector<std::string> FrameworkPaths;
std::vector<std::string> RuntimeSearchPath;
std::set<cmGeneratorTarget const*> SharedLibrariesLinked;
std::vector<cmGeneratorTarget const*> ObjectLibrariesLinked;
std::vector<cmGeneratorTarget const*> RuntimeDLLs;
// Context information.

@ -420,7 +420,7 @@ TargetProperty const StaticTargetProperties[] = {
{ "Fortran_FORMAT"_s, IC::CanCompileSources },
{ "Fortran_MODULE_DIRECTORY"_s, IC::CanCompileSources },
{ "Fortran_COMPILER_LAUNCHER"_s, IC::CanCompileSources },
{ "Fortran_PREPRPOCESS"_s, IC::CanCompileSources },
{ "Fortran_PREPROCESS"_s, IC::CanCompileSources },
{ "Fortran_VISIBILITY_PRESET"_s, IC::CanCompileSources },
// ---- HIP
COMMON_LANGUAGE_PROPERTIES(HIP),

@ -3290,7 +3290,7 @@ if(BUILD_TESTING)
"${CMake_BINARY_DIR}/Tests/CTestTestChecksum/testOutput.log"
)
set_tests_properties(CTestTestChecksum PROPERTIES PASS_REGULAR_EXPRESSION
"Submission failed: Checksum failed for file")
"md5 mismatch")
# these tests take a long time, make sure they have it
# if timeouts have not already been set

@ -169,8 +169,11 @@ endif()
# extensions like '.F' and '.fpp'.
if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
NOT CMAKE_Fortran_COMPILER_ID MATCHES "(Flang|NAG|PGI|NVHPC|SunPro|XL)")
set(CMAKE_Fortran_PREPROCESS OFF)
add_library(no_preprocess_target STATIC no_preprocess_target_upper.F)
target_compile_options(no_preprocess_target PRIVATE -DINTEGER=nonsense)
unset(CMAKE_Fortran_PREPROCESS)
add_library(no_preprocess_source STATIC no_preprocess_source_upper.F)
target_compile_options(no_preprocess_source PRIVATE -DINTEGER=nonsense)
@ -181,6 +184,11 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
target_sources(no_preprocess_source PRIVATE no_preprocess_source_fpp.fpp)
endif()
set_property(TARGET no_preprocess_target PROPERTY Fortran_PREPROCESS OFF)
set_property(SOURCE no_preprocess_source_upper.F no_preprocess_source_fpp.fpp PROPERTY Fortran_PREPROCESS OFF)
endif()
# Issue 25112
set(CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/include")
add_library(objmod OBJECT objmod.f90)
add_executable(objmain objmain.f90)
target_link_libraries(objmain PRIVATE objmod)

@ -0,0 +1,5 @@
program main
use objmod, only : hello
implicit none
call hello()
end program

@ -0,0 +1,7 @@
module objmod
implicit none
contains
subroutine hello()
print '(a)', "hello world"
end subroutine hello
end module objmod

@ -0,0 +1,6 @@
Test project [^
]*/Tests/RunCMake/CTestTimeout/PropertyOverridesScript-build
Start 1: TestTimeout
1/1 Test #1: TestTimeout ...................... Passed +[1-9][0-9.]* sec
+
100% tests passed, 0 tests failed out of 1

@ -87,3 +87,10 @@ block()
set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)")
run_ctest_timeout(ZeroOverridesVar)
endblock()
block()
set(TIMEOUT 4)
set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)")
set(CASE_CMAKELISTS_SUFFIX_CODE "set_property(TEST TestTimeout PROPERTY TIMEOUT 10)\n")
run_ctest_timeout(PropertyOverridesScript)
endblock()

@ -142,6 +142,7 @@ string(REPLACE "," ";" CMake_TEST_MODULE_COMPILATION "${CMake_TEST_MODULE_COMPIL
if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION)
run_cxx_module_test(simple)
run_cxx_module_test(library library-static -DBUILD_SHARED_LIBS=OFF)
run_cxx_module_test(object-library)
run_cxx_module_test(generated)
run_cxx_module_test(deep-chain)
run_cxx_module_test(duplicate)

@ -0,0 +1,4 @@
CMake Warning \(dev\) at CMakeLists.txt:[0-9]* \(target_sources\):
CMake's C\+\+ module support is experimental. It is meant only for
experimentation and feedback to CMake developers.
This warning is for project developers. Use -Wno-dev to suppress it.

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.24)
project(cxx_modules_objlib CXX)
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
add_library(objlib OBJECT)
target_sources(objlib
PUBLIC
FILE_SET CXX_MODULES
BASE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}"
FILES
importable.cxx)
target_compile_features(objlib PUBLIC cxx_std_20)
add_executable(objmain)
target_sources(objmain
PRIVATE
main.cxx)
target_link_libraries(objmain PRIVATE objlib)
add_test(NAME objmain COMMAND objmain)

@ -0,0 +1,6 @@
export module importable;
export int from_import()
{
return 0;
}

@ -0,0 +1,6 @@
import importable;
int main(int argc, char* argv[])
{
return from_import();
}
Loading…
Cancel
Save