mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 03:16:07 +00:00
Fix CMake configuration for MLIR unittests
The CMake changes in 2aa1af9b1da to make it possible to build MLIR as a standalone project unfortunately disabled all unit-tests from the regular in-tree build.
This commit is contained in:
parent
fa35c1f80f
commit
09cfec6243
@ -133,6 +133,7 @@ add_subdirectory(lib)
|
||||
add_subdirectory(lib/CAPI)
|
||||
if (MLIR_INCLUDE_TESTS)
|
||||
add_definitions(-DMLIR_INCLUDE_TESTS)
|
||||
add_custom_target(MLIRUnitTests)
|
||||
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
|
||||
add_subdirectory(unittests)
|
||||
else()
|
||||
|
@ -57,9 +57,7 @@ set(MLIR_TEST_DEPENDS
|
||||
mlir_async_runtime
|
||||
)
|
||||
|
||||
if(TARGET gtest)
|
||||
list(APPEND MLIR_TEST_DEPENDS MLIRUnitTests)
|
||||
endif()
|
||||
list(APPEND MLIR_TEST_DEPENDS MLIRUnitTests)
|
||||
|
||||
if(LLVM_BUILD_EXAMPLES)
|
||||
list(APPEND MLIR_TEST_DEPENDS
|
||||
|
@ -1,4 +1,3 @@
|
||||
add_custom_target(MLIRUnitTests)
|
||||
set_target_properties(MLIRUnitTests PROPERTIES FOLDER "MLIR Tests")
|
||||
|
||||
function(add_mlir_unittest test_dirname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user