This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via fb56ac9209f368712284a3705c0d52ba6f55b6ed (commit) via 39d2ce4a71c7c337060bdbe68e3ac20178789300 (commit) via 689be6235e5be32e8ee8e37801dde1fb1c5add2a (commit) via 6bc77966ad7cce3f12d35e64bcda4be56094b2ca (commit) via 5729580376da53c5665e4e3a043834ad6c7ed706 (commit) from 7099d113aed4789848a69869befb068e6fadafcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb56ac9209f368712284a3705c0d52ba6f55b6ed commit fb56ac9209f368712284a3705c0d52ba6f55b6ed Merge: 39d2ce4 6bc7796 Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Tue Aug 13 14:06:44 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Aug 13 10:07:09 2019 -0400 Merge topic 'retry-directory-delete' 6bc77966ad Retry removing directories on Windows 5729580376 Use registry setting for removal retry count and delay Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3667 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39d2ce4a71c7c337060bdbe68e3ac20178789300 commit 39d2ce4a71c7c337060bdbe68e3ac20178789300 Merge: 7099d11 689be62 Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Tue Aug 13 14:05:26 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Aug 13 10:05:40 2019 -0400 Merge topic 'per-language-link-library-flag' 689be6235e Generator: support per-language link library flag Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3668 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=689be6235e5be32e8ee8e37801dde1fb1c5add2a commit 689be6235e5be32e8ee8e37801dde1fb1c5add2a Author: Saleem Abdulrasool <compn...@compnerd.org> AuthorDate: Thu Aug 8 09:31:42 2019 -0700 Commit: Saleem Abdulrasool <compn...@compnerd.org> CommitDate: Fri Aug 9 08:16:29 2019 -0700 Generator: support per-language link library flag This enables the use of MSVC and Swift on Windows in a single project. MSVC uses no flag to indicate linked libraries while Swift uses `-l`. Add support for a language specific link library flag which takes precedence over the global `CMAKE_LINK_LIBRARY_FLAG` which preserves compatibility with earlier releases. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 432d7fc..22ea877 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -383,6 +383,7 @@ Variables that Control the Build /variable/CMAKE_LANG_CPPCHECK /variable/CMAKE_LANG_CPPLINT /variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE + /variable/CMAKE_LANG_LINK_LIBRARY_FLAG /variable/CMAKE_LANG_VISIBILITY_PRESET /variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY /variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY_CONFIG diff --git a/Help/release/dev/per-lang-link-library-flag.rst b/Help/release/dev/per-lang-link-library-flag.rst new file mode 100644 index 0000000..ca1181d --- /dev/null +++ b/Help/release/dev/per-lang-link-library-flag.rst @@ -0,0 +1,7 @@ +per-lang-link-library-flag +-------------------------- + +* The new :variable:`CMAKE_<LANG>_LINK_LIBRARY_FLAG` flag allows you to now + control the flag used to specify linking to a library on a per-language basis. + This is useful for mixed-language projects where the different drivers may use + different flags. diff --git a/Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst b/Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst new file mode 100644 index 0000000..d7bb0d8 --- /dev/null +++ b/Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst @@ -0,0 +1,7 @@ +CMAKE_<LANG>_LINK_LIBRARY_FLAG +------------------------------ + +Flag to be used to link a library into a shared library or executable. + +This flag will be used to specify a library to link to a shared library or an +executable for the specific language. On most compilers this is ``-l``. diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 54e441c..cb161a6 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -36,6 +36,7 @@ set(CMAKE_Swift_DEFINE_FLAG -D) set(CMAKE_Swift_FRAMEWORK_SEARCH_FLAG "-F ") set(CMAKE_Swift_LIBRARY_PATH_FLAG "-L ") set(CMAKE_Swift_LIBRARY_PATH_TERMINATOR "") +set(CMAKE_Swift_LINK_LIBRARY_FLAG "-l") set(CMAKE_Swift_LINKER_WRAPPER_FLAG "-Xlinker" " ") set(CMAKE_Swift_RESPONSE_FILE_LINK_FLAG @) diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 4aa18f2..0741f8b 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -285,8 +285,13 @@ cmComputeLinkInformation::cmComputeLinkInformation( } // Get options needed to link libraries. - this->LibLinkFlag = - this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); + if (const char* flag = this->Makefile->GetDefinition( + "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FLAG")) { + this->LibLinkFlag = flag; + } else { + this->LibLinkFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); + } this->LibLinkFileFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG"); this->LibLinkSuffix = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bc77966ad7cce3f12d35e64bcda4be56094b2ca commit 6bc77966ad7cce3f12d35e64bcda4be56094b2ca Author: Kasper Laudrup <kasper.laud...@man-es.com> AuthorDate: Thu Aug 8 15:30:17 2019 +0200 Commit: Kasper Laudrup <kasper.laud...@man-es.com> CommitDate: Thu Aug 8 15:59:02 2019 +0200 Retry removing directories on Windows On Windows removing a directory can fail if other processes have a handle to it. This has been "solved" with a retry hack when moving directories, so use the same hack when removing directories. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 22f0d1f..ef26a99 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1422,7 +1422,7 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args, if (cmSystemTools::FileIsDirectory(fileName) && !cmSystemTools::FileIsSymlink(fileName) && recurse) { - cmSystemTools::RemoveADirectory(fileName); + cmSystemTools::RepeatedRemoveDirectory(fileName); } else { cmSystemTools::RemoveFile(fileName); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5729580376da53c5665e4e3a043834ad6c7ed706 commit 5729580376da53c5665e4e3a043834ad6c7ed706 Author: Kasper Laudrup <kasper.laud...@man-es.com> AuthorDate: Thu Aug 8 15:28:51 2019 +0200 Commit: Kasper Laudrup <kasper.laud...@man-es.com> CommitDate: Thu Aug 8 15:59:02 2019 +0200 Use registry setting for removal retry count and delay Instead of hardcoding the amount of retries and the time to sleep between them when removing directories on Windows, use the setting potentially present in the registry instead. This setting is already used when retrying moving directories. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7baf5ed..a168b33 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2838,14 +2838,20 @@ bool cmSystemTools::CheckRPath(std::string const& file, bool cmSystemTools::RepeatedRemoveDirectory(const std::string& dir) { +#ifdef _WIN32 // Windows sometimes locks files temporarily so try a few times. - for (int i = 0; i < 10; ++i) { + WindowsFileRetry retry = cmSystemTools::GetWindowsFileRetry(); + + for (unsigned int i = 0; i < retry.Count; ++i) { if (cmSystemTools::RemoveADirectory(dir)) { return true; } - cmSystemTools::Delay(100); + cmSystemTools::Delay(retry.Delay); } return false; +#else + return cmSystemTools::RemoveADirectory(dir); +#endif } bool cmSystemTools::StringToLong(const char* str, long* value) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/per-lang-link-library-flag.rst | 7 +++++++ Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst | 7 +++++++ Modules/CMakeSwiftInformation.cmake | 1 + Source/cmComputeLinkInformation.cxx | 9 +++++++-- Source/cmFileCommand.cxx | 2 +- Source/cmSystemTools.cxx | 10 ++++++++-- 7 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/per-lang-link-library-flag.rst create mode 100644 Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits