[flang-commits] [PATCH] D138562: [flang] Fix unittests in standalone build for third-party move

Michał Górny via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Nov 23 04:22:41 PST 2022


mgorny created this revision.
mgorny added reviewers: sameeranjoshi, awarzynski, stellaraccident, tstellar, MaskRay, thesamesam.
Herald added a subscriber: StephenFan.
Herald added a project: All.
mgorny requested review of this revision.

Update external unittest rules for flang standalone builds to account
for the unittest components (gtest, gmock) being moved to `third-party`
directory, in a11cd0d94ed3cabf0998a0289aead05da94c86eb <https://reviews.llvm.org/rGa11cd0d94ed3cabf0998a0289aead05da94c86eb>.


https://reviews.llvm.org/D138562

Files:
  flang/CMakeLists.txt


Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -148,10 +148,9 @@
   get_errc_messages(LLVM_LIT_ERRC_MESSAGES)
 
 #Handle unittests when out-of-tree
-#LLVM_BUILD_MAIN_SRC_DIR - Path to llvm source when out-of-tree.
   set(FLANG_GTEST_AVAIL 0)
   if (FLANG_INCLUDE_TESTS)
-    set(UNITTEST_DIR ${LLVM_BUILD_MAIN_SRC_DIR}/utils/unittest)
+    set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
     if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
       if (NOT TARGET llvm_gtest)
         add_library(llvm_gtest


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138562.477451.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221123/ee344eb7/attachment.bin>


More information about the flang-commits mailing list