summaryrefslogtreecommitdiffstats
path: root/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-03-10 15:54:43 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-03-17 22:07:59 (GMT)
commitdabe56de58a32768f0dff740f83539ab8337b132 (patch)
tree1804ac7f935f1344ffeca22388d3e07d85d3350f /Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
parent3a37fda6a2b4f28fdd7efe58f4a0b7570404a7d4 (diff)
downloadCMake-dabe56de58a32768f0dff740f83539ab8337b132.zip
CMake-dabe56de58a32768f0dff740f83539ab8337b132.tar.gz
CMake-dabe56de58a32768f0dff740f83539ab8337b132.tar.bz2
genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE
Diffstat (limited to 'Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt')
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
index ad393b0..ec293d3 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
+++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.txt
@@ -46,27 +46,27 @@ is offered by various environments but with a specific syntax:
.. code-block:: cmake
- set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED TRUE)
+ set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
- set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "-force_load <LIB_ITEM>")
+ set(CMAKE_C_LINK_LIBRARY_USING_load_archive "-force_load <LIB_ITEM>")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "LINKER:--push-state,--whole-archive"
- "<LINK_ITEM>"
- "LINKER:--pop-state")
+ set(CMAKE_C_LINK_LIBRARY_USING_load_archive "LINKER:--push-state,--whole-archive"
+ "<LINK_ITEM>"
+ "LINKER:--pop-state")
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
- set(CMAKE_C_LINK_LIBRARY_USING_whole_archive "/WHOLEARCHIVE:<LIBRARY>")
+ set(CMAKE_C_LINK_LIBRARY_USING_load_archive "/WHOLEARCHIVE:<LIBRARY>")
else()
# feature not yet supported for the other environments
- set(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED FALSE)
+ set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED FALSE)
endif()
add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)
- if(CMAKE_C_LINK_LIBRARY_USING_whole_archive_SUPPORTED)
+ if(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED)
target_link_libraries(lib2 PRIVATE
- "$<LINK_LIBRARY:whole_archive,lib1,$<IF:$<LINK_LANG_AND_ID:C,Clang>,libexternal.a,external>>")
+ "$<LINK_LIBRARY:load_archive,lib1,$<IF:$<LINK_LANG_AND_ID:C,Clang>,libexternal.a,external>>")
else()
target_link_libraries(lib2 PRIVATE lib1 external)
endif()