Skip to content

Commit

Permalink
Deprecate ign_add_benckmarks in favor of gz_ (#265)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Jun 17, 2022
1 parent 8572411 commit 47a949d
Showing 1 changed file with 15 additions and 2 deletions.
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

0 comments on commit 47a949d

Please sign in to comment.