mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Haiku: Add support for RESCAN
Haiku also uses the GNU toolchain and therefore should support this feature.
This commit is contained in:
@@ -20,3 +20,7 @@
|
||||
This feature is available when using toolchains that target Linux, BSD, and
|
||||
SunOS. It can also be used when targeting Windows platforms if the GNU
|
||||
toolchain is used.
|
||||
|
||||
.. versionadded:: 4.4
|
||||
``RESCAN`` is additionally available when using toolchains targeting
|
||||
Haiku.
|
||||
|
||||
@@ -8,6 +8,12 @@ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
|
||||
# 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)
|
||||
|
||||
# Determine, if the C or C++ compiler is configured for a secondary
|
||||
# architecture. If so, that will change the search paths we set below. We check
|
||||
# whether the compiler's library search paths contain a
|
||||
|
||||
@@ -63,7 +63,7 @@ if ((RunCMake_GENERATOR MATCHES "Makefiles|Ninja|Xcode"
|
||||
endif()
|
||||
|
||||
# Feature RESCAN
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux|BSD"
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|Haiku"
|
||||
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