Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Tooling/CMakeLists.txt
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | else() | ||||
set(skip_expensive_processing $<OR:$<CONFIG:Debug>,$<NOT:$<BOOL:${CLANG_TOOLING_BUILD_AST_INTROSPECTION}>>>) | set(skip_expensive_processing $<OR:$<CONFIG:Debug>,$<NOT:$<BOOL:${CLANG_TOOLING_BUILD_AST_INTROSPECTION}>>>) | ||||
set(implicitDirs) | set(implicitDirs) | ||||
foreach(implicitDir ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) | foreach(implicitDir ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) | ||||
list(APPEND implicitDirs -I ${implicitDir}) | list(APPEND implicitDirs -I ${implicitDir}) | ||||
endforeach() | endforeach() | ||||
include(GetClangResourceDir) | |||||
get_clang_resource_dir(resource_dir PREFIX ${LLVM_BINARY_DIR}) | |||||
add_custom_command( | add_custom_command( | ||||
COMMENT Generate ASTNodeAPI.json | COMMENT Generate ASTNodeAPI.json | ||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json | ||||
DEPENDS clang-ast-dump clang-resource-headers | DEPENDS clang-ast-dump clang-resource-headers | ||||
COMMAND | COMMAND | ||||
$<TARGET_FILE:clang-ast-dump> | $<TARGET_FILE:clang-ast-dump> | ||||
# Skip this in debug mode because parsing AST.h is too slow | # Skip this in debug mode because parsing AST.h is too slow | ||||
--skip-processing=${skip_expensive_processing} | --skip-processing=${skip_expensive_processing} | ||||
-I ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION_MAJOR}/include | -I ${resource_dir}/include | ||||
-I ${CLANG_SOURCE_DIR}/include | -I ${CLANG_SOURCE_DIR}/include | ||||
-I ${LLVM_BINARY_DIR}/tools/clang/include | -I ${LLVM_BINARY_DIR}/tools/clang/include | ||||
-I ${LLVM_BINARY_DIR}/include | -I ${LLVM_BINARY_DIR}/include | ||||
-I ${LLVM_SOURCE_DIR}/include | -I ${LLVM_SOURCE_DIR}/include | ||||
${implicitDirs} | ${implicitDirs} | ||||
--json-output-path ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json | --json-output-path ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |