diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-03-05 09:21:44 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-07-03 22:15:44 +0100 |
commit | faf742b05d0564a58bfe0290e53e0b2844bc59c1 (patch) | |
tree | 3cb7a0d32bd4e8175a3e0b17c6786152f00b28e3 /mkspecs | |
parent | f883f8409f6867a9f16d1916bebc29f1debfaff0 (diff) |
dumpcpp: Run dumpcpp if the generated files do not exist at qmake time
By running dumpcpp if the files do not exist at qmake time we enable
the dependency finder to find these files and set up the dependencies
as appropriate. Since other changes ensure that dumpcpp will be called
at the right time when building if the typelib changes, we no longer
need to have the generated files dependent on the objects. As a
result, we are able to prevent it from unnecessarily rebuilding
everything if certain files are updated.
Change-Id: I334f48c7a980aa8b893c14cb2a4687d3b2b7a4b9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/win32/dumpcpp.prf | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mkspecs/features/win32/dumpcpp.prf b/mkspecs/features/win32/dumpcpp.prf index c8cb0dd24b..d19da3d077 100644 --- a/mkspecs/features/win32/dumpcpp.prf +++ b/mkspecs/features/win32/dumpcpp.prf @@ -22,15 +22,15 @@ dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h QMAKE_EXTRA_COMPILERS += dumpcpp_impl -# Create dependencies from every object file to our generated header files. -if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) { +# Call dumpcpp the first time if the files do not exist to help find dependencies +!build_pass:have_target:!contains(TEMPLATE, vc.*) { for(tlb, TYPELIBS) { + tlbCopy = $$replace(tlb, \", ) hdr = $$basename(tlb) - hdr = $$section(hdr, ., 0, -2).h - TYPELIB_HEADERS += $$hdr + hdr = $$section(hdr, ., 0, -2) + tmp_command = $$QMAKE_DUMPCPP $$system_quote($$absolute_path($$tlb, $$_PRO_FILE_PWD_)) \ + -o $$system_quote($$OUT_PWD/$$hdr) + qaxcontainer_compat: tmp_command += -compat + !exists($$OUT_PWD/$${hdr}.h): system($$tmp_command) } - - objtgt.target = $(OBJECTS) - objtgt.depends += $$TYPELIB_HEADERS - QMAKE_EXTRA_TARGETS += objtgt } |