[flang-commits] [PATCH] D138573: [flang] Harmonize standalone gtest support with other projects
Michał Górny via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Nov 23 18:29:39 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG02a2e18e60b9: [flang] Harmonize standalone gtest support with other projects (authored by mgorny).
Herald added a project: Flang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138573/new/
https://reviews.llvm.org/D138573
Files:
flang/CMakeLists.txt
Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -153,23 +153,7 @@
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
- ${UNITTEST_DIR}/googletest/src/gtest-all.cc
- ${UNITTEST_DIR}/googlemock/src/gmock-all.cc
- )
- target_include_directories(llvm_gtest
- PUBLIC
- "${UNITTEST_DIR}/googletest/include"
- "${UNITTEST_DIR}/googlemock/include"
-
- PRIVATE
- "${UNITTEST_DIR}/googletest"
- "${UNITTEST_DIR}/googlemock"
- )
- find_package(Threads)
- target_link_libraries(llvm_gtest PUBLIC Threads::Threads)
- add_library(llvm_gtest_main ${UNITTEST_DIR}/UnitTestMain/TestMain.cpp)
- target_link_libraries(llvm_gtest_main PUBLIC llvm_gtest)
+ add_subdirectory(${UNITTEST_DIR} third-party/unittest)
endif()
set(FLANG_GTEST_AVAIL 1)
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138573.477669.patch
Type: text/x-patch
Size: 1121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221124/97d84c6c/attachment.bin>
More information about the flang-commits
mailing list