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 66#
77#===------------------------------------------------------------------------===#
88
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+
916# Add GTest if not already present.
1017# Using a function so LLVM_SUBPROJECT_TITLE does not propagate.
1118function (build_gtest)
@@ -16,10 +23,6 @@ if (NOT TARGET llvm_gtest)
1623 build_gtest()
1724endif ()
1825
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-
2326# Required because LLVMSupport is compiled with this option (by default).
2427set (CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
2528
You can’t perform that action at this time.
0 commit comments