llvm-project
11 строк · 552.0 Байт
1macro(llvm_enable_language_nolink)
2# Set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY to disable linking
3# in the compiler sanity checks. When bootstrapping the toolchain,
4# the toolchain itself is still incomplete and sanity checks that include
5# linking may fail.
6set(__SAVED_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})
7set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
8enable_language(${ARGV})
9set(CMAKE_TRY_COMPILE_TARGET_TYPE ${__SAVED_TRY_COMPILE_TARGET_TYPE})
10unset(__SAVED_TRY_COMPILE_TARGET_TYPE)
11endmacro()
12