[cmake] use project relative paths when generating ASTNodeAPI.json
authorMatheus Izvekov <mizvekov@gmail.com>
Thu, 11 Nov 2021 12:48:43 +0000 (13:48 +0100)
committerMatheus Izvekov <mizvekov@gmail.com>
Mon, 15 Nov 2021 11:35:34 +0000 (12:35 +0100)
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Reviewed By: stephenneuendorffer

Differential Revision: https://reviews.llvm.org/D113664

clang/lib/Tooling/CMakeLists.txt

index 558385b..403d2df 100644 (file)
@@ -60,11 +60,11 @@ else()
       $<TARGET_FILE:clang-ast-dump>
         # Skip this in debug mode because parsing AST.h is too slow
         --skip-processing=${skip_expensive_processing}
-        -I ${CMAKE_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include
-        -I ${CMAKE_SOURCE_DIR}/../clang/include
-        -I ${CMAKE_BINARY_DIR}/tools/clang/include
-        -I ${CMAKE_BINARY_DIR}/include
-        -I ${CMAKE_SOURCE_DIR}/include
+        -I ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include
+        -I ${CLANG_SOURCE_DIR}/include
+        -I ${LLVM_BINARY_DIR}/tools/clang/include
+        -I ${LLVM_BINARY_DIR}/include
+        -I ${LLVM_SOURCE_DIR}/include
         ${implicitDirs}
         --json-output-path ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json
   )