Allow to load -developer-build without configurations into an IDE
Let -developer-build, -cmake-file-api set up the CMake File API query, so that the build can be loaded directly into IDE's like Qt Creator. [ChangeLog][Build System] configure -developer-build now sets up the CMake File API query, so that a build can be loaded without reconfiguration into Qt Creator and other IDE's. Pass -developer-build -no-cmake-file-api to configure to disable this. Fixes: QTBUG-89487 Change-Id: I69199b8f96da02e42e5610aa6f49881c1582f7da Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
5c29f981fa
commit
d5c3e1336b
@ -91,6 +91,12 @@ while(NOT "${configure_args}" STREQUAL "")
|
||||
string(APPEND path "/mkspecs")
|
||||
endif()
|
||||
push("-DINSTALL_MKSPECSDIR=${path}")
|
||||
elseif(arg STREQUAL "-developer-build")
|
||||
set(developer_build TRUE)
|
||||
elseif(arg STREQUAL "-cmake-file-api")
|
||||
set(cmake_file_api TRUE)
|
||||
elseif(arg STREQUAL "-no-cmake-file-api")
|
||||
set(cmake_file_api FALSE)
|
||||
elseif(arg MATCHES "^-host.*dir")
|
||||
message(FATAL_ERROR "${arg} is not supported anymore.")
|
||||
elseif(arg STREQUAL "--")
|
||||
@ -863,6 +869,12 @@ translate_list_input(includes QT_EXTRA_INCLUDEPATHS)
|
||||
translate_list_input(lpaths QT_EXTRA_LIBDIRS)
|
||||
translate_list_input(rpaths QT_EXTRA_RPATHS)
|
||||
|
||||
if(cmake_file_api OR (developer_build AND NOT DEFINED cmake_file_api))
|
||||
foreach(file cache-v2 cmakeFiles-v1 codemodel-v2 toolchains-v1)
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/.cmake/api/v1/query/${file}" "")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
foreach(input ${config_inputs})
|
||||
qt_feature_normalize_name("${input}" cmake_input)
|
||||
push("-DINPUT_${cmake_input}=${INPUT_${input}}")
|
||||
|
@ -57,6 +57,8 @@ Build options:
|
||||
CMake instead of auto-detecting one.
|
||||
-cmake-use-default-generator ... Turn off auto-detection of the CMake build
|
||||
system generator.
|
||||
-cmake-file-api ...... Let CMake store build metadata for loading the build
|
||||
into an IDE. [no; yes if -developer-build]
|
||||
-no-guess-compiler ... Do not guess the compiler from the target mkspec.
|
||||
-release ............. Build Qt with debugging turned off [yes]
|
||||
-debug ............... Build Qt with debugging turned on [no]
|
||||
|
Loading…
x
Reference in New Issue
Block a user