Skip to content

Commit

Permalink
Avoid warnings about threading model for qt5.
Browse files Browse the repository at this point in the history
Fixes #64 qt5.jam warning <threading>multi ignored.
  • Loading branch information
psandana committed Aug 4, 2021
1 parent 6dda409 commit 37622df
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/tools/qt5.jam
Expand Up @@ -306,7 +306,6 @@ rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin
local usage-requirements =
<include>$(.incprefix)
<library-path>$(.libprefix)
<threading>multi
<allow>qt5 ;

if $(link) in shared
Expand Down
5 changes: 3 additions & 2 deletions test/qt5.py
Expand Up @@ -10,10 +10,11 @@

# Run test in real directory in order to find Boost.Test via Boost Top-Level
# Jamroot.
qt5_dir = os.getcwd() + "/qt5"
qt5_dir = os.path.dirname(os.path.abspath(__file__)) + "/qt5"

t = BoostBuild.Tester(workdir=qt5_dir)

t.run_build_system()

# Fails if a warning is thrown
t.fail_test( t.stdout().find("warning") != -1 )
t.cleanup()
7 changes: 7 additions & 0 deletions test/qt5/initialization.cpp
@@ -0,0 +1,7 @@
#include <iostream>

int main()
{
// dummy file to test initialization of qt
return 0;
}
14 changes: 14 additions & 0 deletions test/qt5/jamroot.jam
Expand Up @@ -9,6 +9,20 @@ import cast ;

path-constant CWD : . ;

if ! [ qt5.initialized ]
{
# assuming qt5 from system
using qt5 : /usr/ ;

project qttest-initialization : ;

alias qt-tests-initialization :
[ run initialization.cpp /qt5//QtCore ]
: # requirements
: # default-build
: # usage-requirements
;
}

if [ qt5.initialized ]
{
Expand Down
2 changes: 2 additions & 0 deletions test/test_all.py
Expand Up @@ -284,6 +284,8 @@ def reorder_tests(tests, first_test):
"project_test3",
"project_test4",
"property_expansion",
# FIXME: Disabled due lack of qt5 detection
# "qt5",
"rebuilds",
"relative_sources",
"remove_requirement",
Expand Down

0 comments on commit 37622df

Please sign in to comment.