build: don't try to use mold with gcc at the moment

This commit is contained in:
Marcus Holland-Moritz 2024-01-14 14:25:45 +01:00
parent 0162aba94e
commit 4966013395

View File

@ -75,9 +75,11 @@ endif()
if(NOT WIN32) if(NOT WIN32)
if(NOT DISABLE_MOLD) if(NOT DISABLE_MOLD)
find_program(MOLD_EXE mold) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(MOLD_EXE) find_program(MOLD_EXE mold)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${MOLD_EXE}") if(MOLD_EXE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${MOLD_EXE}")
endif()
endif() endif()
endif() endif()
endif() endif()