@@ -16,7 +16,6 @@ cmake_policy(SET CMP0074 NEW)
16
16
17
17
# Project
18
18
project (onnx C CXX)
19
- option (ONNX_BUILD_BENCHMARKS "Build ONNX micro-benchmarks" OFF )
20
19
option (ONNX_USE_PROTOBUF_SHARED_LIBS "Build ONNX using protobuf shared library. Sets PROTOBUF_USE_DLLS CMAKE Flag and Protobuf_USE_STATIC_LIBS. " OFF )
21
20
22
21
option (BUILD_ONNX_PYTHON "Build Python binaries" OFF )
@@ -619,30 +618,6 @@ if(BUILD_ONNX_PYTHON)
619
618
endif ()
620
619
endif ()
621
620
622
- if (ONNX_BUILD_BENCHMARKS)
623
- if (NOT TARGET benchmark)
624
- # We will not need to test benchmark lib itself.
625
- set (BENCHMARK_ENABLE_TESTING OFF
626
- CACHE BOOL "Disable benchmark testing as we don't need it." )
627
- # We will not need to install benchmark since we link it statically.
628
- set (BENCHMARK_ENABLE_INSTALL OFF
629
- CACHE BOOL
630
- "Disable benchmark install to avoid overwriting vendor install." )
631
- find_package (benchmark)
632
- if (NOT benchmark_FOUND)
633
- add_subdirectory (${PROJECT_SOURCE_DIR} /third_party/benchmark)
634
- endif ()
635
- endif ()
636
-
637
- add_executable (protobuf-bench tools/protobuf-bench.cc)
638
- target_include_directories (protobuf-bench PUBLIC
639
- $<BUILD_INTERFACE:${ONNX_ROOT} >
640
- $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} >
641
- $<INSTALL_INTERFACE:include >
642
- $<BUILD_INTERFACE:${PROTOBUF_INCLUDE_DIRS} >)
643
- target_link_libraries (protobuf-bench onnx_proto benchmark::benchmark)
644
- endif ()
645
-
646
621
# Export include directories
647
622
set (ONNX_INCLUDE_DIRS "${ONNX_ROOT} " "${CMAKE_CURRENT_BINARY_DIR} " )
648
623
get_directory_property (hasParent PARENT_DIRECTORY )
@@ -742,7 +717,7 @@ if(ONNX_USE_UNITY_BUILD)
742
717
# If ONNX_USE_UNITY_BUILD is set to ON, set onnx target to use Unity builds.
743
718
# We set Unity build to use groups, it allows us to set some specific files to be compiled individually
744
719
set_target_properties (onnx
745
- PROPERTIES
720
+ PROPERTIES
746
721
UNITY_BUILD ON
747
722
UNITY_BUILD_MODE GROUP
748
723
)
0 commit comments