Skip to content

Commit

Permalink
Correct use of ArgumentWarningShown
Browse files Browse the repository at this point in the history
  • Loading branch information
mvieth committed Nov 27, 2020
1 parent 4f06cc0 commit d4db768
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,10 @@ function(PCL_ADD_BENCHMARK _name)
#Only applies to MSVC
if(MSVC)
#Requires CMAKE version 3.13.0
if(CMAKE_VERSION VERSION_LESS "3.13.0" AND (NOT ArgumentWarningShown))
get_target_property(BenchmarkArgumentWarningShown run_benchmarks PCL_BENCHMARK_ARGUMENTS_WARNING_SHOWN)
if(CMAKE_VERSION VERSION_LESS "3.13.0" AND (NOT BenchmarkArgumentWarningShown))
message(WARNING "Arguments for benchmark projects are not added - this requires at least CMake 3.13. Can be added manually in \"Project settings -> Debugging -> Command arguments\"")
set (ArgumentWarningShown TRUE PARENT_SCOPE)
set_target_properties(run_benchmarks PROPERTIES PCL_BENCHMARK_ARGUMENTS_WARNING_SHOWN TRUE)
else()
#Only add if there are arguments to test
if(PCL_ADD_BENCHMARK_ARGUMENTS)
Expand Down

0 comments on commit d4db768

Please sign in to comment.