Files
Sourcetrail/cmake/CLANGConfig.cmake
T
Eberhard Graether 4b4c9f56d8 setup: Added clang and llvm
Adds clang and llvm include directories and libraries to the build. The
environment variable CLANG_DIR is used to define the location of llvm
and clang. A simple clang tool implementation was added to assure proper
operation of the libraries.
2014-04-09 16:25:32 +02:00

51 lines
1.0 KiB
CMake

execute_process(
COMMAND $ENV{CLANG_DIR}/build/bin/llvm-config --cxxflags
OUTPUT_VARIABLE CLANG_DEFINITIONS
)
set(CLANG_DEFINITIONS ${CLANG_DEFINITIONS} "-fno-rtti")
set(CLANG_INCLUDE_DIRS
"$ENV{CLANG_DIR}/llvm/tools/clang/include"
"$ENV{CLANG_DIR}/build/tools/clang/include"
)
set(CLANG_LIBRARY_DIRS "$ENV{CLANG_DIR}/build/lib")
set(CLANG_LIBRARIES
#clangApplyReplacements
#clangARCMigrate
#clangCodeGen
#clangDynamicASTMatchers
#clangFormat
#clangFrontendTool
#clangIndex
#clangQuer
#clangTidy
#clangTidyGoogleModule
#clangTidyLLVMModule
#clangTidyMiscModule
clangASTMatchers
clangFrontend
clangSerialization
clangDriver
clangTooling
clangParse
clangSema
clangStaticAnalyzerFrontend
clangStaticAnalyzerCheckers
clangStaticAnalyzerCore
clangAnalysis
clangRewriteFrontend
clangRewriteCore
clangEdit
clangAST
clangLex
clangBasic
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CLANG DEFAULT_MSG CLANG_LIBRARIES CLANG_INCLUDE_DIRS)
mark_as_advanced(CLANG_INCLUDE_DIRS CLANG_LIBRARIES)