diff options
author | Brad King <brad.king@kitware.com> | 2024-03-14 15:44:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-03-14 15:45:13 (GMT) |
commit | 8f0801caccd768860768ffd358288cdb75a0654f (patch) | |
tree | 4223a02c55e8be1181a527cb9a74bac412406c79 /Modules | |
parent | d93a7c18d86af65076e092c6879991e6b29ae4be (diff) | |
parent | 801ae06952fc090d07c666b1e56573cae648f599 (diff) | |
download | CMake-8f0801caccd768860768ffd358288cdb75a0654f.zip CMake-8f0801caccd768860768ffd358288cdb75a0654f.tar.gz CMake-8f0801caccd768860768ffd358288cdb75a0654f.tar.bz2 |
Merge topic 'LINKER_TYPE-mold-support' into release-3.29
801ae06952 LINKER_TYPE: Support MOLD only on GCC versions that support it
939ac5287e LINKER_TYPE: fix spelling error in message
922883782b LINKER_TYPE: Document that linker tool should be in the PATH
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9334
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Linux-GNU.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake index c3878eb..24bf1bb 100644 --- a/Modules/Platform/Linux-GNU.cmake +++ b/Modules/Platform/Linux-GNU.cmake @@ -20,5 +20,8 @@ macro(__linux_compiler_gnu lang) set(CMAKE_${lang}_USING_LINKER_LLD "-fuse-ld=lld") set(CMAKE_${lang}_USING_LINKER_BFD "-fuse-ld=bfd") set(CMAKE_${lang}_USING_LINKER_GOLD "-fuse-ld=gold") - set(CMAKE_${lang}_USING_LINKER_MOLD "-fuse-ld=mold") + if(NOT CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" + OR CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1") + set(CMAKE_${lang}_USING_LINKER_MOLD "-fuse-ld=mold") + endif() endmacro() |