diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 9ed570a11..82e11ef76 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -112,7 +112,6 @@ They are normally called through the :command:`find_package` command. /module/FindBacktrace /module/FindBISON /module/FindBLAS - /module/FindBoost /module/FindBullet /module/FindBZip2 /module/FindCABLE @@ -291,6 +290,7 @@ Deprecated Find Modules .. toctree:: :maxdepth: 1 + /module/FindBoost /module/FindCUDA /module/FindDart /module/FindITK diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1abdd626e..315c73d65 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -677,7 +677,6 @@ Variables for CTest /variable/CTEST_CONFIGURE_COMMAND /variable/CTEST_COVERAGE_COMMAND /variable/CTEST_COVERAGE_EXTRA_FLAGS - /variable/CTEST_CURL_OPTIONS /variable/CTEST_CUSTOM_COVERAGE_EXCLUDE /variable/CTEST_CUSTOM_ERROR_EXCEPTION /variable/CTEST_CUSTOM_ERROR_MATCH @@ -849,6 +848,7 @@ Deprecated Variables for CTest .. toctree:: :maxdepth: 1 + /variable/CTEST_CURL_OPTIONS /variable/CTEST_CVS_CHECKOUT /variable/CTEST_SCP_COMMAND /variable/CTEST_TRIGGER_SITE diff --git a/Help/release/3.29.rst b/Help/release/3.29.rst index 950616e91..6634cccd7 100644 --- a/Help/release/3.29.rst +++ b/Help/release/3.29.rst @@ -231,9 +231,9 @@ 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.6, 3.29.7 +-------------- -* This version made no changes to documented features or interfaces. +* These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions. diff --git a/Help/release/3.30.rst b/Help/release/3.30.rst index 6d515fdec..558b1ea91 100644 --- a/Help/release/3.30.rst +++ b/Help/release/3.30.rst @@ -242,3 +242,15 @@ Other Changes directory has already been populated. CMake 3.29 and earlier did not check this requirement, but it is now enforced, subject to policy :policy:`CMP0170`. + +Updates +======= + +Changes made since CMake 3.30.0 include the following. + +3.30.1 +------ + +* This version made no changes to documented features or interfaces. + Some implementation updates were made to support ecosystem changes + and/or fix regressions. diff --git a/Modules/Compiler/IntelLLVM-FindBinUtils.cmake b/Modules/Compiler/IntelLLVM-FindBinUtils.cmake index c5b1ee63d..a4445f7c5 100644 --- a/Modules/Compiler/IntelLLVM-FindBinUtils.cmake +++ b/Modules/Compiler/IntelLLVM-FindBinUtils.cmake @@ -19,8 +19,11 @@ get_filename_component(__intel_llvm_hint_1 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE get_filename_component(__intel_llvm_hint_1 "${__intel_llvm_hint_1}/../bin-llvm" REALPATH) get_filename_component(__intel_llvm_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY) +get_filename_component(__intel_llvm_hint_2 "${__intel_llvm_hint_2}/compiler" REALPATH) -set(__intel_llvm_hints ${__intel_llvm_hint_1} ${__intel_llvm_hint_2}) +get_filename_component(__intel_llvm_hint_3 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY) + +set(__intel_llvm_hints ${__intel_llvm_hint_1} ${__intel_llvm_hint_2} ${__intel_llvm_hint_3}) # http://manpages.ubuntu.com/manpages/precise/en/man1/llvm-ar.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES diff --git a/Modules/ExternalProject/gitclone.cmake.in b/Modules/ExternalProject/gitclone.cmake.in index 93424ed37..b80bcb167 100644 --- a/Modules/ExternalProject/gitclone.cmake.in +++ b/Modules/ExternalProject/gitclone.cmake.in @@ -16,7 +16,7 @@ endif() # enabling them to be shown for DEBUG may be useful to help diagnose problems. cmake_language(GET_MESSAGE_LOG_LEVEL active_log_level) if(active_log_level MATCHES "DEBUG|TRACE") - set(maybe_show_command "COMMAND_ECHO STDOUT") + set(maybe_show_command COMMAND_ECHO STDOUT) else() set(maybe_show_command "") endif() diff --git a/Modules/ExternalProject/gitupdate.cmake.in b/Modules/ExternalProject/gitupdate.cmake.in index 4e3fba67d..fb0c6a66a 100644 --- a/Modules/ExternalProject/gitupdate.cmake.in +++ b/Modules/ExternalProject/gitupdate.cmake.in @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.5) # enabling them to be shown for DEBUG may be useful to help diagnose problems. cmake_language(GET_MESSAGE_LOG_LEVEL active_log_level) if(active_log_level MATCHES "DEBUG|TRACE") - set(maybe_show_command "COMMAND_ECHO STDOUT") + set(maybe_show_command COMMAND_ECHO STDOUT) else() set(maybe_show_command "") endif() diff --git a/Modules/ExternalProject/hgclone.cmake.in b/Modules/ExternalProject/hgclone.cmake.in index 993ab7f66..96449aaa9 100644 --- a/Modules/ExternalProject/hgclone.cmake.in +++ b/Modules/ExternalProject/hgclone.cmake.in @@ -16,7 +16,7 @@ endif() # enabling them to be shown for DEBUG may be useful to help diagnose problems. cmake_language(GET_MESSAGE_LOG_LEVEL active_log_level) if(active_log_level MATCHES "DEBUG|TRACE") - set(maybe_show_command "COMMAND_ECHO STDOUT") + set(maybe_show_command COMMAND_ECHO STDOUT) else() set(maybe_show_command "") endif() diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 84f7c62f0..45d4681c6 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -297,7 +297,8 @@ set(_FindMatlab_SELF_DIR "${CMAKE_CURRENT_LIST_DIR}") include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -if(NOT WIN32 AND NOT APPLE AND NOT Threads_FOUND) +if(NOT WIN32 AND NOT APPLE AND NOT Threads_FOUND + AND (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)) # MEX files use pthread if available set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) @@ -1776,10 +1777,10 @@ endif() set(MATLAB_INCLUDE_DIR_TO_LOOK ${Matlab_ROOT_DIR}/extern/include) -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(_matlab_current_suffix ${_matlab_bin_suffix_64bits}) -else() +if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(_matlab_current_suffix ${_matlab_bin_suffix_32bits}) +else() + set(_matlab_current_suffix ${_matlab_bin_suffix_64bits}) endif() set(Matlab_BINARIES_DIR diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 069daa81b..50073bc71 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 30) -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 [==[0f88f57389 CMake 3.30.0]==]) + set(git_info [==[cd386f6425 CMake 3.30.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]* " diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index 3a5806b95..b8e5db1c9 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -19,6 +19,7 @@ cmCTestCurl::cmCTestCurl(cmCTest* ctest) , CurlOpts(ctest) { this->SetProxyType(); + cmCurlInitOnce(); // In windows, this will init the winsock stuff ::curl_global_init(CURL_GLOBAL_ALL); this->Curl = curl_easy_init(); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index e69a7feb6..85c77bea0 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -171,6 +171,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP( headers = ::curl_slist_append(headers, h.c_str()); } + cmCurlInitOnce(); /* In windows, this will init the winsock stuff */ ::curl_global_init(CURL_GLOBAL_ALL); cmCTestCurlOpts curlOpts(this->CTest); diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index ddd5f69b9..65fccd035 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -39,6 +39,11 @@ # define CURL_SSLVERSION_TLSv1_3 CURL_SSLVERSION_LAST #endif +// curl versions before 7.64.1 referred to Secure Transport as DarwinSSL +#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x074001 +# define CURLSSLBACKEND_SECURETRANSPORT CURLSSLBACKEND_DARWINSSL +#endif + // Make sure we keep up with new TLS versions supported by curl. // Do this only for our vendored curl to avoid breaking builds // against external future versions of curl. @@ -47,6 +52,30 @@ static_assert(CURL_SSLVERSION_LAST == 8, "A new CURL_SSLVERSION_ may be available!"); #endif +void cmCurlInitOnce() +{ + // curl 7.56.0 introduced curl_global_sslset. +#if defined(__APPLE__) && defined(CMAKE_USE_SYSTEM_CURL) && \ + defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM >= 0x073800 + static bool initialized = false; + if (initialized) { + return; + } + initialized = true; + + cm::optional curl_ssl_backend = + cmSystemTools::GetEnvVar("CURL_SSL_BACKEND"); + if (!curl_ssl_backend || curl_ssl_backend->empty()) { + curl_version_info_data* cv = curl_version_info(CURLVERSION_FIRST); + // curl 8.3.0 through 8.5.x did not re-initialize LibreSSL correctly, + // so prefer the Secure Transport backend by default in those versions. + if (cv->version_num >= 0x080300 && cv->version_num < 0x080600) { + curl_global_sslset(CURLSSLBACKEND_SECURETRANSPORT, NULL, NULL); + } + } +#endif +} + cm::optional cmCurlParseTLSVersion(cm::string_view tls_version) { cm::optional v; diff --git a/Source/cmCurl.h b/Source/cmCurl.h index 8b8c88b89..bb2221f25 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -11,6 +11,7 @@ #include +void cmCurlInitOnce(); cm::optional cmCurlParseTLSVersion(cm::string_view tls_version); cm::optional cmCurlPrintTLSVersion(int curl_tls_version); std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile = {}); diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index a5348f203..28c91dada 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -613,6 +613,7 @@ void cmExportFileGenerator::PopulateCustomTransitiveInterfaceProperties( properties); this->PopulateInterfaceProperty("TRANSITIVE_LINK_PROPERTIES", target, properties); + cmGeneratorTarget::CheckLinkLibrariesSuppressionRAII cllSuppressRAII; std::set ifaceProperties; for (std::string const& config : this->Configurations) { for (auto const& i : target->GetCustomTransitiveProperties( diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index ce8cc2a39..6265f8217 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2115,6 +2115,7 @@ bool HandleDownloadCommand(std::vector const& args, url = cmCurlFixFileURL(url); ::CURL* curl; + cmCurlInitOnce(); ::curl_global_init(CURL_GLOBAL_DEFAULT); curl = ::curl_easy_init(); if (!curl) { @@ -2488,6 +2489,7 @@ bool HandleUploadCommand(std::vector const& args, url = cmCurlFixFileURL(url); ::CURL* curl; + cmCurlInitOnce(); ::curl_global_init(CURL_GLOBAL_DEFAULT); curl = ::curl_easy_init(); if (!curl) { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 4521fd4e1..1e6ff782a 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -99,6 +99,13 @@ public: // Call this after generation is complete. void CheckLinkLibraries() const; + class CheckLinkLibrariesSuppressionRAII + { + public: + CheckLinkLibrariesSuppressionRAII(); + ~CheckLinkLibrariesSuppressionRAII(); + }; + cmStateEnums::TargetType GetType() const; const std::string& GetName() const; std::string GetExportName() const; diff --git a/Source/cmGeneratorTarget_Link.cxx b/Source/cmGeneratorTarget_Link.cxx index 079942996..50bcefaf2 100644 --- a/Source/cmGeneratorTarget_Link.cxx +++ b/Source/cmGeneratorTarget_Link.cxx @@ -54,6 +54,20 @@ const std::string kINTERFACE_LINK_LIBRARIES_DIRECT = "INTERFACE_LINK_LIBRARIES_DIRECT"; const std::string kINTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE = "INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE"; + +unsigned int CheckLinkLibrariesSuppressionRAIICount; +void MaybeEnableCheckLinkLibraries(cmOptionalLinkImplementation& impl) +{ + if (CheckLinkLibrariesSuppressionRAIICount == 0) { + impl.CheckLinkLibraries = true; + } +} +void MaybeEnableCheckLinkLibraries(cmOptionalLinkInterface& iface) +{ + if (CheckLinkLibrariesSuppressionRAIICount == 0) { + iface.CheckLinkLibraries = true; + } +} } class cmTargetCollectLinkLanguages @@ -372,7 +386,8 @@ void cmGeneratorTarget::CheckLinkLibraries() const // There could be several entries used when computing the pre-CMP0022 // default link interface. Check only the entry for our own link impl. auto const hmi = hm.find(this); - if (hmi == hm.end() || !hmi->second.LibrariesDone) { + if (hmi == hm.end() || !hmi->second.LibrariesDone || + !hmi->second.CheckLinkLibraries) { continue; } for (cmLinkImplItem const& item : hmi->second.Libraries) { @@ -392,7 +407,7 @@ void cmGeneratorTarget::CheckLinkLibraries() const // should be a subset of LinkInterfaceMap (with LINK_ONLY left out). for (auto const& hmp : this->LinkInterfaceMap) { for (auto const& hmi : hmp.second) { - if (!hmi.second.LibrariesDone) { + if (!hmi.second.LibrariesDone || !hmi.second.CheckLinkLibraries) { continue; } for (cmLinkItem const& item : hmi.second.Libraries) { @@ -408,6 +423,18 @@ void cmGeneratorTarget::CheckLinkLibraries() const } } +cmGeneratorTarget::CheckLinkLibrariesSuppressionRAII:: + CheckLinkLibrariesSuppressionRAII() +{ + ++CheckLinkLibrariesSuppressionRAIICount; +} + +cmGeneratorTarget::CheckLinkLibrariesSuppressionRAII:: + ~CheckLinkLibrariesSuppressionRAII() +{ + --CheckLinkLibrariesSuppressionRAIICount; +} + namespace { cm::string_view missingTargetPossibleReasons = "Possible reasons include:\n" @@ -642,6 +669,7 @@ cmLinkInterface const* cmGeneratorTarget::GetLinkInterface( if (secondPass) { iface = cmOptionalLinkInterface(); } + MaybeEnableCheckLinkLibraries(iface); if (!iface.LibrariesDone) { iface.LibrariesDone = true; this->ComputeLinkInterfaceLibraries(config, iface, head, UseTo::Link); @@ -765,6 +793,7 @@ const cmLinkInterfaceLibraries* cmGeneratorTarget::GetLinkInterfaceLibraries( } cmOptionalLinkInterface& iface = hm[head]; + MaybeEnableCheckLinkLibraries(iface); if (!iface.LibrariesDone) { iface.LibrariesDone = true; this->ComputeLinkInterfaceLibraries(config, iface, head, usage); @@ -1034,6 +1063,7 @@ const cmLinkInterface* cmGeneratorTarget::GetImportLinkInterface( if (secondPass) { iface = cmOptionalLinkInterface(); } + MaybeEnableCheckLinkLibraries(iface); if (!iface.AllDone) { iface.AllDone = true; iface.LibrariesDone = true; @@ -1106,6 +1136,7 @@ const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation( if (secondPass) { impl = cmOptionalLinkImplementation(); } + MaybeEnableCheckLinkLibraries(impl); if (!impl.LibrariesDone) { impl.LibrariesDone = true; this->ComputeLinkImplementationLibraries(config, impl, this, usage); @@ -1162,6 +1193,7 @@ cmGeneratorTarget::GetLinkImplementationLibrariesInternal( } cmOptionalLinkImplementation& impl = hm[head]; + MaybeEnableCheckLinkLibraries(impl); if (!impl.LibrariesDone) { impl.LibrariesDone = true; this->ComputeLinkImplementationLibraries(config, impl, head, usage); diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h index 1946c9b69..4e356b7ab 100644 --- a/Source/cmLinkItem.h +++ b/Source/cmLinkItem.h @@ -124,6 +124,7 @@ struct cmOptionalLinkInterface : public cmLinkInterface bool AllDone = false; bool Exists = false; bool Explicit = false; + bool CheckLinkLibraries = false; }; struct cmHeadToLinkInterfaceMap @@ -148,6 +149,7 @@ struct cmOptionalLinkImplementation : public cmLinkImplementation bool LibrariesDone = false; bool LanguagesDone = false; bool HadHeadSensitiveCondition = false; + bool CheckLinkLibraries = false; }; /** Compute the link type to use for the given configuration. */ diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0fb8baed6..a3d524436 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3880,6 +3880,14 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.AddFlag("CudaRuntime", "None"); } + if (this->ProjectType == VsProjectType::vcxproj && this->MSTools) { + // Suppress inheritance of host compiler optimization flags + // when the project does not specify any optimization flags for CUDA. + if (!cudaOptions.HasFlag("Optimization")) { + cudaOptions.AddFlag("Optimization", ""); + } + } + this->CudaOptions[configName] = std::move(pOptions); return true; } diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 8f83587cb..28118bae9 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -29,6 +29,9 @@ add_library(compileOnly INTERFACE) target_compile_definitions(compileOnly INTERFACE FROM_compileOnly) target_link_options(compileOnly INTERFACE -fthis-flag-does-not-exist) +add_library(noUses INTERFACE) +target_link_libraries(noUses INTERFACE this::target_does_not_exist) + add_library(testLib1 STATIC testLib1.c) add_library(testLib2 STATIC testLib2.c) target_link_libraries(testLib2 testLib1) @@ -601,6 +604,7 @@ install(FILES install( TARGETS compileOnly + noUses testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3 testExe4 testExe2lib testLib4lib testLib4libdbg testLib4libopt testLib6 testLib7 testLib8 @@ -676,7 +680,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3 testSharedLibDepends renamed_on_export cmp0022NEW cmp0022OLD TopDirLib SubDirLinkA - systemlib + systemlib noUses testInterfaceIncludeUser testInterfaceIncludeUser2 NAMESPACE bld_ diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index 3c7cd68e7..98e3996c8 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -15,9 +15,6 @@ endif() run_cmake(BadIndependentStep1) run_cmake(BadIndependentStep2) -run_cmake(TLSVersionBadArg) -run_cmake(TLSVersionBadVar) -run_cmake(TLSVersionBadEnv) run_cmake(NoOptions) run_cmake(SourceEmpty) run_cmake(SourceMissing) @@ -256,5 +253,9 @@ if(GIT_EXECUTABLE) # on some platforms. It may go to stdout or stderr, so force it to be merged. set(RunCMake_TEST_OUTPUT_MERGE TRUE) run_cmake(FetchGitRefs) - set(RunCMake_TEST_OUTPUT_MERGE FALSE) + unset(RunCMake_TEST_OUTPUT_MERGE) + + run_cmake(TLSVersionBadArg) + run_cmake(TLSVersionBadVar) + run_cmake(TLSVersionBadEnv) endif() diff --git a/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake new file mode 100644 index 000000000..14442bc97 --- /dev/null +++ b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake @@ -0,0 +1,4 @@ +add_library(foo INTERFACE) +target_link_libraries(foo INTERFACE nonexistent::bar) +install(TARGETS foo DESTINATION lib EXPORT foo-targets) +install(EXPORT foo-targets FILE foo-targets.cmake DESTINATION lib) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 7b0aa8522..295922c0d 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -85,6 +85,7 @@ run_cmake(EXPORT-UnknownExport) run_cmake(EXPORT-NamelinkOnly) run_cmake(EXPORT-SeparateNamelink) run_cmake(EXPORT-TargetTwice) +run_cmake(EXPORT-InterfaceLinkNoexist) run_cmake(CMP0062-OLD) run_cmake(CMP0062-NEW) run_cmake(CMP0062-WARN) diff --git a/Utilities/cmlibuv/src/idna.c b/Utilities/cmlibuv/src/idna.c index 93d982ca0..858b19d00 100644 --- a/Utilities/cmlibuv/src/idna.c +++ b/Utilities/cmlibuv/src/idna.c @@ -274,6 +274,9 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) { char* ds; int rc; + if (s == se) + return UV_EINVAL; + ds = d; si = s; @@ -308,8 +311,9 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) { return rc; } - if (d < de) - *d++ = '\0'; + if (d >= de) + return UV_EINVAL; + *d++ = '\0'; return d - ds; /* Number of bytes written. */ }