diff --git a/circle-mlir/CMakeLists.txt b/circle-mlir/CMakeLists.txt index 8f70407438e..1a0303e2dcc 100644 --- a/circle-mlir/CMakeLists.txt +++ b/circle-mlir/CMakeLists.txt @@ -23,16 +23,16 @@ endif() # configuration flags include(CfgOptionFlags) -# enable test coverage +# setup test coverage include(TestCoverage) -# enable ctest -include(CTest) - -# enable googletest but do not install -set(INSTALL_GTEST OFF) -include(GTestHelper) -include(GoogleTest) +if(ENABLE_TEST) + include(CTest) + # enable googletest but do not install + set(INSTALL_GTEST OFF) + include(GTestHelper) + include(GoogleTest) +endif() # to override externals install if(DEFINED ENV{CIRCLE_MLIR_LOCALINST}) diff --git a/circle-mlir/circle-mlir/CMakeLists.txt b/circle-mlir/circle-mlir/CMakeLists.txt index 4091ef8746b..738b907b8ce 100644 --- a/circle-mlir/circle-mlir/CMakeLists.txt +++ b/circle-mlir/circle-mlir/CMakeLists.txt @@ -3,4 +3,6 @@ include(UseAbseil) add_subdirectory(lib) add_subdirectory(tools) -add_subdirectory(tools-test) +if(ENABLE_TEST) + add_subdirectory(tools-test) +endif()