mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
Genex-LINK_GROUP: Add support feature RESCAN on BSD systems
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
rescan-static-libraries
|
||||
-----------------------
|
||||
|
||||
* The :genex:`LINK_GROUP` generator expression gained the ability to manage
|
||||
circular references between static libraries by using ``RESCAN`` feature.
|
||||
* The :genex:`LINK_GROUP` generator expression gained the ability to manage, on
|
||||
``Linux`` and ``BSD`` systems, circular references between static libraries
|
||||
by using ``RESCAN`` feature.
|
||||
|
||||
@@ -15,8 +15,8 @@ static libraries, the following feature can be used:
|
||||
``-z rescan-start`` and ``-z rescan-end``).
|
||||
|
||||
Using this feature has a significant performance cost. It is best to use it
|
||||
only when there are unavoidable circular references between two or more static
|
||||
libraries.
|
||||
only when there are unavoidable circular references between two or more
|
||||
static libraries.
|
||||
|
||||
This feature is available on ``Linux`` and ``SunOS`` platforms as well as
|
||||
``Windows`` when ``GNU`` toolchain is used.
|
||||
This feature is available on ``Linux``, ``BSD``, and ``SunOS`` target
|
||||
platforms as well as ``Windows`` when ``GNU`` toolchain is used.
|
||||
|
||||
@@ -53,4 +53,11 @@ endif()
|
||||
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
|
||||
|
||||
|
||||
# Features for LINK_GROUP generator expression
|
||||
## RESCAN: request the linker to rescan static libraries until there is
|
||||
## no pending undefined symbols
|
||||
set(CMAKE_LINK_GROUP_USING_RESCAN "LINKER:--start-group" "LINKER:--end-group")
|
||||
set(CMAKE_LINK_GROUP_USING_RESCAN_SUPPORTED TRUE)
|
||||
|
||||
|
||||
include(Platform/UnixPaths)
|
||||
|
||||
@@ -39,4 +39,11 @@ endif()
|
||||
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
|
||||
|
||||
|
||||
# Features for LINK_GROUP generator expression
|
||||
## RESCAN: request the linker to rescan static libraries until there is
|
||||
## no pending undefined symbols
|
||||
set(CMAKE_LINK_GROUP_USING_RESCAN "LINKER:--start-group" "LINKER:--end-group")
|
||||
set(CMAKE_LINK_GROUP_USING_RESCAN_SUPPORTED TRUE)
|
||||
|
||||
|
||||
include(Platform/UnixPaths)
|
||||
|
||||
@@ -63,7 +63,7 @@ if ((RunCMake_GENERATOR MATCHES "Makefiles|Ninja|Xcode"
|
||||
endif()
|
||||
|
||||
# Feature RESCAN
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux"
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux|BSD"
|
||||
OR (CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND (NOT CMAKE_C_COMPILER_ID STREQUAL "SunPro" OR CMAKE_C_COMPILER_VERSION VERSION_GREATER "5.9"))
|
||||
OR (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
|
||||
run_cmake(rescan)
|
||||
|
||||
Reference in New Issue
Block a user