Skip to content

Commit

Permalink
[MLIR] Fix building unittests in in-tree build
Browse files Browse the repository at this point in the history
Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D95978
  • Loading branch information
isuruf authored and joker-eph committed Feb 4, 2021
1 parent a1d5bdf commit c95c0db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ add_subdirectory(lib)
add_subdirectory(lib/CAPI)
if (MLIR_INCLUDE_TESTS)
add_definitions(-DMLIR_INCLUDE_TESTS)
if (TARGET gtest)
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
add_subdirectory(unittests)
else()
message(WARNING "gtest not found, unittests will not be available")
Expand Down

0 comments on commit c95c0db

Please sign in to comment.