Skip to content

Commit

Permalink
Add QT_BUILD_DIR to the cmake configure option list
Browse files Browse the repository at this point in the history
The variable is required to calculate the inner CMake prefixes when
building the Qt CMake tests inside Qt CMake tests. Otherwise the prefix
path remain empty and CMake attempts looking for Qt by the system
paths.

This fixes Qt CMake tests when running them as part of non-prefixed
build tree.

Pick-to: 6.7 6.8
Change-Id: I8908ab0b47fe37044ccb2a950d8973790e4fd174
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
semlanik committed Sep 18, 2024
1 parent b68b3e7 commit f80c0f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/corelib/Qt6CTestMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ function(_qt_internal_get_cmake_test_configure_options out_var)

list(APPEND option_list "-DCMAKE_MESSAGE_LOG_LEVEL=DEBUG")
list(APPEND option_list "-DCMAKE_AUTOGEN_VERBOSE=TRUE")
if(QT_BUILD_DIR)
list(APPEND option_list "-DQT_BUILD_DIR=${QT_BUILD_DIR}")
endif()

if(APPLE AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES osx_arch_count)
Expand Down

0 comments on commit f80c0f1

Please sign in to comment.