summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorDoug Johnston <doug.johnston@gmail.com>2017-04-06 17:25:56 (GMT)
committerDoug Johnston <doug.johnston@gmail.com>2017-04-06 17:25:56 (GMT)
commit818aefcecf3cca986c971cd236bd7b77337db955 (patch)
treed5f6b59eec1ae57d746a454ee73c072e0b677d1c /src/CMakeLists.txt
parentb91f4665693f52d02f18ee626ef201a8113321ff (diff)
downloadDoxygen-818aefcecf3cca986c971cd236bd7b77337db955.zip
Doxygen-818aefcecf3cca986c971cd236bd7b77337db955.tar.gz
Doxygen-818aefcecf3cca986c971cd236bd7b77337db955.tar.bz2
make use of clang compilation database
See: https://clang.llvm.org/docs/JSONCompilationDatabase.html
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 08c8439..df76cb0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -244,6 +244,19 @@ add_library(_doxygen STATIC
)
add_executable(doxygen main.cpp)
+
+if (use_libclang)
+ find_package(LLVM REQUIRED CONFIG)
+ find_package(Clang REQUIRED CONFIG)
+ target_compile_features(_doxygen PRIVATE cxx_alignof)
+ target_compile_options(_doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ target_compile_features(doxygen PRIVATE cxx_alignof)
+ target_compile_options(doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ llvm_map_components_to_libnames(llvm_libs support core option)
+ target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
+ set(CLANG_LIBS ${llvm_libs} ${CLANG_LIBS} clangTooling)
+endif()
+
target_link_libraries(doxygen
_doxygen
doxycfg