diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-14 17:02:59 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-19 10:16:05 +0200 |
commit | fae09465c7f06819731e54ffc6c63a0614fdfa6f (patch) | |
tree | 1993f7b1bc0ff420c336ff7a28c7245388e66bd4 /cmake/QtAutoDetect.cmake | |
parent | 06b148074a591c333623e387bac8451b3e334af6 (diff) |
CMake: Default to building all configurations with Ninja Multi-Config
Thus we will build both Release and Debug configurations in Coin
when cmake --build . is executed, mimicking qmake's make which
builds both configurations in debug_and_release.
Task-number: QTBUG-80900
Change-Id: If48aca249eb84e690d3f9d51a733b3a25df1f7ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtAutoDetect.cmake')
-rw-r--r-- | cmake/QtAutoDetect.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake index dd5d8a6bd6..2fa103963a 100644 --- a/cmake/QtAutoDetect.cmake +++ b/cmake/QtAutoDetect.cmake @@ -172,8 +172,15 @@ function(qt_auto_detect_cmake_config) set(CMAKE_TRY_COMPILE_CONFIGURATION "${QT_MULTI_CONFIG_FIRST_CONFIG}" PARENT_SCOPE) if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config") + # Create build-<config>.ninja files for all specified configurations. set(CMAKE_CROSS_CONFIGS "all" CACHE STRING "") + + # The configuration that will be considered the main one (for example when + # configuring standalone tests with a single-config generator like Ninja). set(CMAKE_DEFAULT_BUILD_TYPE "${QT_MULTI_CONFIG_FIRST_CONFIG}" CACHE STRING "") + + # By default when ninja is called without parameters, it will build all configurations. + set(CMAKE_DEFAULT_CONFIGS "all" CACHE STRING "") endif() endif() endfunction() |