aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/PrintFunctionNames/CMakeLists.txt9
-rw-r--r--examples/analyzer-plugin/CMakeLists.txt9
-rw-r--r--tools/libclang/CMakeLists.txt13
3 files changed, 31 insertions, 0 deletions
diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt
index a31a8f69e7..ba6a350cd9 100644
--- a/examples/PrintFunctionNames/CMakeLists.txt
+++ b/examples/PrintFunctionNames/CMakeLists.txt
@@ -4,6 +4,15 @@ set( LLVM_LINK_COMPONENTS support mc)
add_clang_library(PrintFunctionNames PrintFunctionNames.cpp)
+add_dependencies(PrintFunctionNames
+ ClangAttrClasses
+ ClangAttrList
+ ClangCommentNodes
+ ClangDeclNodes
+ ClangDiagnosticCommon
+ ClangStmtNodes
+ )
+
target_link_libraries(PrintFunctionNames
clangFrontend
clangAST
diff --git a/examples/analyzer-plugin/CMakeLists.txt b/examples/analyzer-plugin/CMakeLists.txt
index 9ad5cace80..ba73030cc3 100644
--- a/examples/analyzer-plugin/CMakeLists.txt
+++ b/examples/analyzer-plugin/CMakeLists.txt
@@ -4,6 +4,15 @@ set( LLVM_LINK_COMPONENTS support mc)
add_clang_library(SampleAnalyzerPlugin MainCallChecker.cpp)
+add_dependencies(SampleAnalyzerPlugin
+ ClangAttrClasses
+ ClangAttrList
+ ClangCommentNodes
+ ClangDeclNodes
+ ClangDiagnosticCommon
+ ClangStmtNodes
+ )
+
target_link_libraries(SampleAnalyzerPlugin
clangStaticAnalyzerCore
)
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index 627003832f..45f5e13fc8 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -53,10 +53,22 @@ set(LIBRARIES
clangBasic
)
+set(GENERATED_HEADERS
+ ClangAttrClasses
+ ClangAttrList
+ ClangAttrParsedAttrList
+ ClangCommentNodes
+ ClangDiagnosticCommon
+ ClangDiagnosticFrontend
+ ClangDeclNodes
+ ClangStmtNodes
+ )
+
if( LLVM_ENABLE_PIC )
set(SHARED_LIBRARY TRUE)
add_clang_library(libclang ${SOURCES})
target_link_libraries(libclang ${LIBRARIES})
+ add_dependencies(libclang ${GENERATED_HEADERS})
if(WIN32)
set_target_properties(libclang
@@ -90,6 +102,7 @@ endif()
if( NOT BUILD_SHARED_LIBS AND NOT WIN32 )
add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES})
target_link_libraries(${LIBCLANG_STATIC_TARGET_NAME} ${LIBRARIES})
+ add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS})
set_target_properties(${LIBCLANG_STATIC_TARGET_NAME}
PROPERTIES