Commit a282d110 authored by tzik's avatar tzik Committed by Commit bot

Support external clang source directory in //tools/clang/CMakeList.txt

Chromium clang plugins depends on clang headers, and the configuration
file assumes it's checked out in a fixed path in the LLVM source tree.
That is inconvenient to build it out of tree.

This CL adjusts the include path setting for external checkout of clang.

Review-Url: https://codereview.chromium.org/2394203003
Cr-Commit-Position: refs/heads/master@{#423809}
parent d26ef311
......@@ -19,15 +19,21 @@ else(UNIX)
endif()
include_directories("${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/tools/clang/include"
"${CMAKE_BINARY_DIR}/include"
"${CMAKE_BINARY_DIR}/tools/clang/include")
link_directories("${CMAKE_SOURCE_DIR}/lib"
"${CMAKE_SOURCE_DIR}/tools/clang/lib"
"${CMAKE_BINARY_DIR}/lib"
"${CMAKE_BINARY_DIR}/tools/clang/lib")
if (DEFINED LLVM_EXTERNAL_CLANG_SOURCE_DIR)
include_directories("${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include")
link_directories("${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/lib")
else ()
include_directories("${CMAKE_SOURCE_DIR}/tools/clang/include")
link_directories("${CMAKE_SOURCE_DIR}/tools/clang/lib")
endif ()
# Tests for all enabled tools can be run by building this target.
add_custom_target(cr-check-all COMMAND ${CMAKE_CTEST_COMMAND} -V)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment