Skip to content

Commit d27525b

Browse files
committed
Add some information on how to use a custom build of clang
1 parent fc669e0 commit d27525b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/docs/LibClang.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ Code example
6464
cmake_minimum_required(VERSION 3.20)
6565
project(my_clang_tool VERSION 0.1.0)
6666
67+
# This will find the default system installation of Clang; if you want to
68+
# use a different build of clang, pass -DClang_DIR=/foobar/lib/cmake/clang
69+
# to the CMake configure command, where /foobar is the build directory where
70+
# you built Clang.
6771
find_package(Clang CONFIG REQUIRED)
6872
6973
add_executable(my_clang_tool main.cpp)
@@ -376,6 +380,10 @@ Complete example code
376380
cmake_minimum_required(VERSION 3.20)
377381
project(my_clang_tool VERSION 0.1.0)
378382
383+
# This will find the default system installation of Clang; if you want to
384+
# use a different build of clang, pass -DClang_DIR=/foobar/lib/cmake/clang
385+
# to the CMake configure command, where /foobar is the build directory where
386+
# you built Clang.
379387
find_package(Clang CONFIG REQUIRED)
380388
381389
add_executable(my_clang_tool main.cpp)

0 commit comments

Comments
 (0)