diff --git a/.gitmodules b/.gitmodules index 389a903343..64ad14e6ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "cmake/external/googletest"] path = cmake/external/googletest url = https://github.com/google/googletest.git +[submodule "cmake/external/googlebenchmark"] + path = cmake/external/googlebenchmark + url = https://github.com/google/benchmark.git [submodule "cmake/external/onnx"] path = cmake/external/onnx url = https://github.com/onnx/onnx diff --git a/cgmanifests/submodules/cgmanifest.json b/cgmanifests/submodules/cgmanifest.json index 7bb7befc6b..f4ac602b82 100644 --- a/cgmanifests/submodules/cgmanifest.json +++ b/cgmanifests/submodules/cgmanifest.json @@ -198,6 +198,16 @@ "comments": "git submodule at cmake/external/flatbuffers" } }, + { + "component": { + "type": "git", + "git": { + "commitHash": "7d0d9061d83b663ce05d9de5da3d5865a3845b79", + "repositoryUrl": "https://github.com/google/benchmark.git" + }, + "comments": "git submodule at cmake/external/googlebenchmark" + } + }, { "component": { "type": "git", diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 6848b04b7c..409e80cfee 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -664,7 +664,7 @@ if(onnxruntime_BUILD_BENCHMARKS) set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.") # We will not need to install benchmark since we link it statically. set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable benchmark install to avoid overwriting vendor install.") - add_subdirectory(${PROJECT_SOURCE_DIR}/external/onnx/third_party/benchmark EXCLUDE_FROM_ALL) + add_subdirectory(${PROJECT_SOURCE_DIR}/external/googlebenchmark EXCLUDE_FROM_ALL) add_library(benchmark::benchmark ALIAS benchmark) endif() endif() diff --git a/cmake/external/googlebenchmark b/cmake/external/googlebenchmark new file mode 160000 index 0000000000..7d0d9061d8 --- /dev/null +++ b/cmake/external/googlebenchmark @@ -0,0 +1 @@ +Subproject commit 7d0d9061d83b663ce05d9de5da3d5865a3845b79