Skip to content

Commit 909898e

Browse files
committed
[cmake] [unittests] include googletest headers to Xcode project header search paths
add target include directories on AddSwiftUnittests.cmake module. currently generated Xcode project doesn't include googletest headers after https://reviews.llvm.org/D86616
1 parent f3eff4a commit 909898e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ function(add_swift_unittest test_dirname)
1010
# function defined by AddLLVM.cmake.
1111
add_unittest(SwiftUnitTests ${test_dirname} ${ARGN})
1212

13+
target_include_directories(${test_dirname} PUBLIC ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
14+
target_include_directories(${test_dirname} PUBLIC ${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
15+
1316
# TODO: _add_variant_c_compile_link_flags and these tests should share some
1417
# sort of logic.
1518
#

0 commit comments

Comments
 (0)