DarkflameServer/cmake/toolchains/linux-clang.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
507 B
CMake
Raw Normal View History

2024-04-05 23:06:37 +00:00
# Try and find a clang-16 install, falling back to a generic clang install otherwise
find_program(CLANG_C_COMPILER clang-16 | clang REQUIRED)
find_program(CLANG_CXX_COMPILER clang++-16 | clang++ REQUIRED)
# Debug messages
2024-04-09 01:11:59 +00:00
message(DEBUG "CLANG_C_COMPILER = ${CLANG_C_COMPILER}")
message(DEBUG "CLANG_CXX_COMPILER = ${CLANG_CXX_COMPILER}")
2024-04-05 23:06:37 +00:00
# Set compilers to clang
set(CMAKE_C_COMPILER ${CLANG_C_COMPILER})
set(CMAKE_CXX_COMPILER ${CLANG_CXX_COMPILER})
# Set linker to lld
add_link_options("-fuse-ld=lld")