mirror of
https://github.com/reactos/CMake.git
synced 2025-02-26 23:15:28 +00:00
Merge topic 'per-language-link-library-flag'
689be6235e Generator: support per-language link library flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3668
This commit is contained in:
commit
39d2ce4a71
@ -384,6 +384,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
|
||||
|
7
Help/release/dev/per-lang-link-library-flag.rst
Normal file
7
Help/release/dev/per-lang-link-library-flag.rst
Normal file
@ -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.
|
7
Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst
Normal file
7
Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst
Normal file
@ -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``.
|
@ -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 @)
|
||||
|
||||
|
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user