Skip to content

Commit 58d1988

Browse files
committed
[flang] Fix unittests in standalone build for third-party move
Update external unittest rules for flang standalone builds to account for the unittest components (gtest, gmock) being moved to `third-party` directory, in a11cd0d. Differential Revision: https://reviews.llvm.org/D138562
1 parent 6d4ab6d commit 58d1988

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flang/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ if (FLANG_STANDALONE_BUILD)
148148
get_errc_messages(LLVM_LIT_ERRC_MESSAGES)
149149

150150
#Handle unittests when out-of-tree
151-
#LLVM_BUILD_MAIN_SRC_DIR - Path to llvm source when out-of-tree.
152151
set(FLANG_GTEST_AVAIL 0)
153152
if (FLANG_INCLUDE_TESTS)
154-
set(UNITTEST_DIR ${LLVM_BUILD_MAIN_SRC_DIR}/utils/unittest)
153+
set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
155154
if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
156155
if (NOT TARGET llvm_gtest)
157156
add_library(llvm_gtest

0 commit comments

Comments
 (0)