Skip to content

Commit e2ddd14

Browse files
authored
[unittest] Add missing LLVM include directory to target (#148362)
Add the top-level LLVM include directory to the `llvm_gtest` target, as it requires `llvm/Support/raw_os_ostream.h` header. This fixes a flang-rt unittest build failure introduced in #143682.
1 parent 4d01418 commit e2ddd14

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

third-party/unittest/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ if (NOT LLVM_ENABLE_THREADS)
7474
target_compile_definitions(llvm_gtest PUBLIC GTEST_HAS_PTHREAD=0)
7575
endif ()
7676

77+
# Top-level include directory required for "llvm/Support/raw_os_ostream.h"
7778
target_include_directories(llvm_gtest
7879
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googletest/include>
7980
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googlemock/include>
81+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/>
8082
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/llvm-gtest/>
8183
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/llvm-gmock/>
8284
PRIVATE googletest googlemock

0 commit comments

Comments
 (0)