Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.6.1
-
None
-
Windows7 x64
Description
Someone probably decided to use regular expression to scan whole project and automatically exclude .c files that appear in include statement from list of compilation units. I see no reason for it, especially since it's undocumented and invisible to the end-user. The only difference is in the generated makefile.
I have a special clause in my code that allows me to submit whole project as a single compilation unit to my universitie's upload system. The system is retarded and doesn't allow students to structure their homeworks, so I use that as a workaround. For example at the end of my "arrays.h" file, there's:
#ifdef PREPROCESING_FOR_ODEVSYS
#include "arrays.c"
#endif
This ifdef is does not pass when compiling in qtcreator, but you'd need more than a regular expression to detect that. When I removed this line, the qmake immediatelly added my arrays.c to makefile.
I used this as a workaround:
#ifdef PREPROCESING_FOR_ODEVSYS
#define ARRAYS_C_QMAKE_IS_RETARDED "arrays.c"
#include ARRAYS_C_QMAKE_IS_RETARDED
#endif
This is inconsistent, undocumented behavior in qmake. It needs to be either retracted or made consistent and apparent (eg. by a warning that source file was ignored).
Attachments
Issue Links
- duplicates
-
QTBUG-24906 qmake does not add cpp files to SOURCES / OBJECTS sections in Makefile, when the same cpp file is included into another cpp file.
- Closed