need to list included .c files as test file dependancies

  • As an embedded C developer I make good use of Qt Creator as a cross platform test environment. Typically I generate a unit test file and then to include the C source files for testing I add this at the beginning:

    extern "C" {
    #include "source1.c"
    #include "source2.c"

    This works great as I get access to static variables and functions. The problem I need to solve is dependancies. When I change a C source file, the enclosing c++ test file doesn't rebuild. I have to manually do that myself or make a null change in the test file.

    Is there a way in the .pro file to state that the testfile.cpp is dependant on source1.c and source2.c?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    qmake's DEPENDPATH might be of use.

    Hope it helps

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.