mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
2ce1d090c2
Add cmake support for CLC and ll asm language, the latter includes clang preprocessing stage. Add ctests to check for external function calls. v2: fix typos, style Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> Acked-by: Vedran Miletić <vedran@miletic.net> llvm-svn: 347667
19 lines
651 B
CMake
19 lines
651 B
CMake
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
|
|
|
|
if(NOT CMAKE_CLC_COMPILER)
|
|
find_program(CMAKE_CLC_COMPILER NAMES clang)
|
|
endif()
|
|
mark_as_advanced(CMAKE_CLC_COMPILER)
|
|
|
|
if(NOT CMAKE_CLC_ARCHIVE)
|
|
find_program(CMAKE_CLC_ARCHIVE NAMES llvm-link)
|
|
endif()
|
|
mark_as_advanced(CMAKE_CLC_ARCHIVE)
|
|
|
|
set(CMAKE_CLC_COMPILER_ENV_VAR "CLC_COMPILER")
|
|
set(CMAKE_CLC_ARCHIVE_ENV_VAR "CLC_LINKER")
|
|
find_file(clc_comp_in CMakeCLCCompiler.cmake.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH})
|
|
# configure all variables set in this file
|
|
configure_file(${clc_comp_in} ${CMAKE_PLATFORM_INFO_DIR}/CMakeCLCCompiler.cmake @ONLY)
|
|
mark_as_advanced(clc_comp_in)
|