Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ign_add_benckmarks in favor of gz_ #265

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions cmake/IgnBenchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Adds a target to generate build and system configuration information. This
# function is private to gz-cmake.
#
# ign_add_benchmarks()
# gz_add_benchmarks()
#
# Adds a target to execute all available benchmarks and aggregate the results.
#
Expand All @@ -16,7 +16,7 @@
# include(IgnBenchmark)
#
# 2. Add the benchmark
# ign_add_benchmarks(SOURCES ${benchmark_sources_list})
# gz_add_benchmarks(SOURCES ${benchmark_sources_list})
#
# 3. After building the project, use `make run_benchmarks` to execute and
# aggregate benchmark results to ${CMAKE_BINARY_DIR}/benchmark_results
Expand Down Expand Up @@ -60,8 +60,21 @@ function(_gz_add_version_info_target)
endfunction()

function(ign_add_benchmarks)
# TODO(chapulina) Enable warnings after all libraries have migrated.
# message(WARNING "ign_add_benchmarks is deprecated, use gz_add_benchmarks instead.")

cmake_parse_arguments(BENCHMARK "" "" "SOURCES" ${ARGN})

set(gz_add_benchmarks_skip_parsing true)
gz_add_benchmarks()
endfunction()
function(gz_add_benchmarks)

# Deprecated, remove skip parsing logic in version 4
if (NOT gz_add_benchmarks_skip_parsing)
cmake_parse_arguments(BENCHMARK "" "" "SOURCES" ${ARGN})
endif()

if(NOT BUILD_TESTING)
return()
endif()
Expand Down