diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-03-10 16:54:43 +0100 |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-03-17 23:07:59 +0100 |
commit | dabe56de58a32768f0dff740f83539ab8337b132 (patch) | |
tree | 1804ac7f935f1344ffeca22388d3e07d85d3350f /Modules/Platform/Windows-Clang.cmake | |
parent | 3a37fda6a2b4f28fdd7efe58f4a0b7570404a7d4 (diff) | |
download | cmake-dabe56de58a32768f0dff740f83539ab8337b132.tar.gz |
genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE
Diffstat (limited to 'Modules/Platform/Windows-Clang.cmake')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index e7e975d117..7600c8d6f6 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -113,6 +113,13 @@ macro(__windows_compiler_clang_gnu lang) string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_LOWER) set(CMAKE_${lang}_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames") + # Features for LINK_LIBRARY generator expression + if(MSVC_VERSION GREATER "1900") + ## WHOLE_ARCHIVE: Force loading all members of an archive + set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:/WHOLEARCHIVE:<LIBRARY>") + set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE) + endif() + enable_language(RC) endmacro() |