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. Change-Id: I8e480c9e72b47783c0910428187f0092049e89db Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1d6a35c5363944ce59eba114f827b1992f31bde3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c19d957f45
commit
5fc0ebf6a7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user