diff options
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index 6f42e337da..837b81db4d 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -73,8 +73,16 @@ if(FEATURE_developer_build) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) endif() set(QT_BUILD_TESTING ON) + set(__build_benchmarks ON) + + # Disable benchmarks for single configuration generators which do not build + # with release configuration. + if (CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE STREQUAL Release) + set(__build_benchmarks OFF) + endif() else() set(QT_BUILD_TESTING OFF) + set(__build_benchmarks OFF) endif() ## Set up testing @@ -85,6 +93,9 @@ enable_testing() # Set up building of examples. option(BUILD_EXAMPLES "Build Qt examples" ON) +# Build Benchmarks +option(QT_BUILD_BENCHMARKS "Build Qt Benchmarks" ${__build_benchmarks}) + ## Android platform settings if(ANDROID) include(QtPlatformAndroid) |