From 13ae61c596eb1a825eea30889d02e735c9fc3068 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Mon, 20 Apr 2026 11:46:25 +0200 Subject: [PATCH] [circle-mlir] Build without installing test dependencies This commit wraps GoogleTest installation with ENABLE_TEST which adds possibility to build onnx2circle without test dependencies. ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy --- circle-mlir/CMakeLists.txt | 16 ++++++++-------- circle-mlir/circle-mlir/CMakeLists.txt | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) 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()