[Qt-creator] What makes a message a "Compile Error"

Michael Jackson mike.jackson at bluequartz.net
Tue Mar 6 14:34:47 CET 2018


-----Original Message-----
From: Tobias Hunger <tobias.hunger at gmail.com>
Date: Tuesday, March 6, 2018 at 8:02 AM
To: Michael Jackson <mike.jackson at bluequartz.net>
Cc: qt-creator <qt-creator at qt-project.org>
Subject: Re: [Qt-creator] What makes a message a "Compile Error"

    On Tue, Mar 6, 2018 at 1:41 PM, Michael Jackson
    <mike.jackson at bluequartz.net> wrote:
    > As part of our build we execute a few external programs that create output. It seems that QtCreator seems to think that these messages are errors even though they are not.
    
    Creator uses classes derived from IOutputParser to decide what to list
    in the issues tab.
    
    > Is there a specific pattern that we can use in our output messages so that QtCreator can interpret them correctly?
    
    Lot's of them:-) All nicely defined in lots of RegExps.
    
    The actual patterns used do depend a lot on your project though:
    Creator uses a list of IOutputParsers and feeds all stdout/stderr text
    from the build process through the chain of parsers.
    
    The actual parsers in the chain do depend on OS, build system used,
    compiler selected, whether you use Qt or not and probably some more
    factors:-)
    
    > Sometime those programs actually _do_ error out and we want those errors to show up in QtCreator's error list.
    
    You will need to add another outputparser to the chain then or extend
    an existing parser to match the messages you want.
    
    I am happy to add more patterns, provided they are generally
    applicable of course and that somebody provides the necessary test
    data (the actual error messages and whether those come from stdout or
    stderr).
    
    Best Regards,
    Tobias
    

I'm using Qt classes, we compile on Linux (GCC), macOS (clang) and Windows (VS 2015/2017). We use C++ and CMake for the build system. The part that throws a false positive is a custom build step where we call "cmake -P" to load another generated script. It is that script that puts out the error messages. I used to have the absolute path to the CMake script file as part of the output but that seemed to trigger the error. Now I just put "MKDOCS: Something happened" and that seems to not trigger the error messages.

Could you point me to the regex expressions? I don't really have the source for QtCreator up and compiling at the moment.

--
Michael Jackson | Owner, President
      BlueQuartz Software
[e] mike.jackson at bluequartz.net
[w] www.bluequartz.net





More information about the Qt-creator mailing list