So I finally figured it out after browsing through both qdoc 5.11 and qbs 
sources. Several things that needs to be done for the below product to work:
 
1. Install clang3.9 and put its bin into system PATH. Later versions do not 
work (contrary to what documentation claims)
 
2. All header files need to be included in a "moduleheader" file specified in 
qdocconf file like so: 
 
moduleheader = MyModule.h
 
3. qdoc does not have ANY include paths set by default nor does qbs supply any to it. Yet 
it is trying to find this moduleheader file in them. On the commandline it is easily 
solved with -I switch for qdoc however qbs does hard-code qdoc parameters so it does not 
work. Luckily one can use undocummented "includepaths" variable inside 
*.qdocconf to simulate -I command line option.
 
4. In order for qdoc/clang to be able to resolve the file names included in moduleheader 
file one either needs to supply relative paths from it to the included header files OR 
they must be reachable from the includepaths. Again, one can simply augment 
"includepaths" variable with all paths that are needed to resolve all headers.
 
After all is set up correctly qbs should be able to build the documentation 
again with Qt 5.11's qdoc.
 
 
REGARDING QBS AND NEW QDOC:
 
Since the includepaths are not something you may wish to be setting manually in 
the *.qdocconf would it be possible to have a variable in which they may be set 
from Qbs file? Either that or more generically allow us to append additional 
command line arguments to qbs for invoking qdoc. I tried hacking into 
qt.core.qdocName but it did not do anything (probably read-only?).
 
In any case lack of diagnostics I complained about is not really qbs fault here 
but rather qdoc's (already reported) although I suspect qbs could issue some 
warning or two if it finds that the invocation of qdoc will likely fail if it 
is missing the moduleheader and includepaths set for it.
 
______________________________________________________________
Od: <resurrect...@centrum.cz>
Komu: <qbs@qt-project.org>
Datum: 23.03.2018 18:06
Předmět: [Qbs] Unable to run qdoc in Qt 5.11

In Qt 5.11 qdoc underwent major rewrite with Clang as its backend. 
Unfortunately there is something wrong or missing now in the Qbs product that 
is supposed to build documentation with qdoc. Product that works with Qt 5.10 
qdoc (no clang):

Product {
    Depends { name: "Qt"; submodules: [ "core" ]; }
    builtByDefault: false
    type: "qch"
    
    Group
    {
        files: *.qdocconf
        fileTags: "qdocconf-main"
    }
 
    Group
    {
        fileTagsFilter: ["qdoc-output"]
        qbs.install: true
        qbs.installDir: project.installDirectory
        qbs.installSourceBase: Qt.core.qdocOutputDir
    }
 
    Group
    {
        fileTagsFilter: ["qch"]
        qbs.install: true
        qbs.installDir: project.installDirectory
}   
 
I have tried supplying the path to clang with LLVM_INSTALL_DIR environment 
variable (both global and local to build) and adding the LLVM/bin to 
environment path. Neither works when building this product. No warning, no 
error, no output.
 
Running qdoc on the command line works.
 
Any ideas or necessary changes for new qdoc?
 
Thanks,
Michael


----------

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs 
<http://lists.qt-project.org/mailman/listinfo/qbs>

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to