Ignore:
Timestamp:
Jul 29, 2009, 6:57:31 PM (11 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake/OS/2: Added DEFINES_RSP file generation to overcome command line length limitation when calling moc (#23).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/generators/os2/gnumake.cpp

    r57 r94  
    535535void GNUMakefileGenerator::createCompilerResponseFiles(QTextStream &t)
    536536{
    537     static const char *vars[] = { "CFLAGS",   /*<=*/ "QMAKE_CFLAGS",
    538                                   "CXXFLAGS", /*<=*/ "QMAKE_CXXFLAGS",
    539                                   "INCPATH",  /*<=*/ "INCLUDEPATH" };
     537    static const char *vars[] = { "CFLAGS", "CXXFLAGS", "DEFINES", "INCPATH" };
    540538
    541539    /* QMAKE_XXX_RSP_VAR is used as a flag whether it is necessary to
     
    546544     * other places of qmake.conf (e.g. rules) */
    547545
    548     for (size_t i = 0; i < sizeof(vars)/sizeof(vars[0]); i+=2) {
     546    for (size_t i = 0; i < sizeof(vars)/sizeof(vars[0]); ++i) {
    549547        QString rspVar =
    550548            project->first(QString().sprintf("QMAKE_%s_RSP_VAR", vars[i]));
     
    555553            if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
    556554                QTextStream rt(&file);
    557                 if (!qstrcmp(vars[i+1], "INCLUDEPATH")) {
     555                if (!qstrcmp(vars[i], "CFLAGS")) {
     556                    rt << varGlue("QMAKE_CFLAGS", QString::null, "\n", "\n");
     557                } else if (!qstrcmp(vars[i], "CXXFLAGS")) {
     558                    rt << varGlue("QMAKE_CXXFLAGS", QString::null, "\n", "\n");
     559                } else if (!qstrcmp(vars[i], "DEFINES")) {
     560                    rt << varGlue("PRL_EXPORT_DEFINES", "-D", "\n-D", "\n")
     561                       << varGlue("DEFINES", "-D", "\n-D", "\n");
     562                } else if (!qstrcmp(vars[i], "INCPATH")) {
    558563                    QString opt = var("QMAKE_CFLAGS_INCDIR");
    559                     rt << varGlue(vars[i+1], opt, "\n" + opt, "\n");
     564                    rt << varGlue("INCLUDEPATH", opt, "\n" + opt, "\n");
    560565                } else {
    561                     rt << varGlue(vars[i+1], QString::null, "\n", "\n")
    562                        << varGlue("PRL_EXPORT_DEFINES", "-D", "\n-D", "\n")
    563                        << varGlue("DEFINES", "-D", "\n-D", "\n");
     566                    Q_ASSERT(false);
    564567                }
    565568                rt.flush();
Note: See TracChangeset for help on using the changeset viewer.