Commit 1d6a35c5 authored by Mårten Nordheim's avatar Mårten Nordheim
Browse files

CMake: Don't attempt to add to a target that doesn't exist



When configuring a benchmark using the standalone-test script the
'benchmark' target is not available, causing a configure error.

Pick-to: 6.1 6.0
Change-Id: I8e480c9e72b47783c0910428187f0092049e89db
Reviewed-by: default avatarAlexey Edelev <alexey.edelev@qt.io>
Reviewed-by: default avatarAlexandru Croitor <alexandru.croitor@qt.io>
parent fac23d69
......@@ -51,8 +51,10 @@ function(qt_internal_add_benchmark target)
add_dependencies("${target}_benchmark" "${target}")
#Add benchmark to meta target.
add_dependencies("benchmark" "${target}_benchmark")
# Add benchmark to meta target if it exists.
if (TARGET benchmark)
add_dependencies("benchmark" "${target}_benchmark")
endif()
endfunction()
# Simple wrapper around qt_internal_add_executable for manual tests which insure that
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment