File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 6
6
#
7
7
#===------------------------------------------------------------------------===#
8
8
9
+ # LLVM uses a modified version of GTest that uses LLVMSupport for console
10
+ # output. Therefore it also needs to include files from LLVM. Unfortunately,
11
+ # LLVM/GTest doesn't add the include search path itself. Limiting the scope
12
+ # using target_include_directories does not work because with
13
+ # LLVM_INSTALL_GTEST=ON, llvm_gtest is an IMPORT library.
14
+ include_directories ("${LLVM_INCLUDE_DIR} " "${LLVM_MAIN_INCLUDE_DIR} " )
15
+
9
16
# Add GTest if not already present.
10
17
# Using a function so LLVM_SUBPROJECT_TITLE does not propagate.
11
18
function (build_gtest )
@@ -16,10 +23,6 @@ if (NOT TARGET llvm_gtest)
16
23
build_gtest ()
17
24
endif ()
18
25
19
- # LLVM's modified GTest depends on LLVM, but not all sibling runtime projects
20
- # creating a llvm_gtest target also use target_include_directories.
21
- target_include_directories (llvm_gtest PUBLIC "${LLVM_INCLUDE_DIR} " "${LLVM_MAIN_INCLUDE_DIR} " )
22
-
23
26
# Required because LLVMSupport is compiled with this option (by default).
24
27
set (CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL )
25
28
You can’t perform that action at this time.
0 commit comments