qmake fails processing many many sources in one .pri
On Fedora 9, Qt 4.5.2's qmake seems not to like including a very large .pri file with very many SOURCES/HEADERS. After including it, stange behaviour appears. In particular the system() calls no longer get executed.
Contents of files.pri (cut):
Code:
# ==================================================
# This file has been automatically generated.
# Please do not edit.
# ==================================================
GEN_HEADERS += path_to\src\generated\headerx.h
GEN_SOURCES += path_to\src\generated\sourcex.cpp
...
[620 headers + 620 sources]
HEADERS += $$GEN_HEADERS
SOURCES += $$GEN_SOURCES
QMAKE_CLEAN += $$GEN_HEADERS
QMAKE_CLEAN += $$GEN_SOURCES
QMAKE_DISTCLEAN +=path_to\src\generated\files.pri
On Windows, and on Fedora 10 and 11, this still works.
However, I wonder whether they just have a larger limit, or if they have no (practical) limit?
Re: qmake fails processing many many sources in one .pri
Are you sure this is caused by QMake?
Re: qmake fails processing many many sources in one .pri
Yes, I am quite convinced.
The other .pro files are more or less as follows.
Main .pro file:
Code:
# set some variables configuring the file format for which an API must be generated
include(../format.pri)
Generic format.pri file:
Code:
# among others, call code generation python script,
# generating a zillion of classes, and a files.pri file listing those classes
# as indicated in original post
include ($${CGOUTPUTDIR}/files.pri)
# system(...) calls below fail if files.pri too large
system(...)
Further experiments showed that it seems to be the size of the file or of the variable contents that causes this problem. Reducing the path length (but keeping the same number of sources) resolves the issue.
However, the number of files generated will still increase in near future, so it is important for me to known whether there is a (practical) limit in later Fedora versions/other versions of Qt.
Re: qmake fails processing many many sources in one .pri
But how do you know it is not somehow related to Fedora and not QMake? You said yourself later versions of Fedora do not suffer from this issue.
Re: qmake fails processing many many sources in one .pri
Correction, let's say that it is an issue with qmake running on Fedora 9. It may thus indeed be Fedora. I currently have no clue where it lies.
Let me rephrase my question:
Is the failure I observe specific for qmake on Fedora 9, or is there inherently a limit (though larger on other platforms) in the number of sources I can use in this setup.
Of course, there always is a limit, but I am wondering if this limit is significant, or extremely large...
If the limit is significant, I will probably run onto it also when migrating to a later Fedora, and would have to refactor my code generation.