diff --git a/lib/lib.pri b/lib/lib.pri index 7972cd1eb..24e2ca24e 100644 --- a/lib/lib.pri +++ b/lib/lib.pri @@ -1,4 +1,4 @@ -# Common project include with headers and sources +# no manual edits - this file is autogenerated by dmake HEADERS += $$PWD/check.h \ $$PWD/checkautovariables.h \ @@ -11,7 +11,6 @@ HEADERS += $$PWD/check.h \ $$PWD/checkother.h \ $$PWD/checkstl.h \ $$PWD/checkunusedfunctions.h \ - $$PWD/classinfo.h \ $$PWD/cppcheck.h \ $$PWD/errorlogger.h \ $$PWD/executionpath.h \ diff --git a/tools/dmake.cpp b/tools/dmake.cpp index abc2a1d4e..db557f05b 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -106,6 +106,36 @@ int main() std::vector testfiles; getCppFiles(testfiles, "test/"); + + // QMAKE - lib/lib.pri + { + std::ofstream fout1("lib/lib.pri"); + if (fout1.is_open()) + { + fout1 << "# no manual edits - this file is autogenerated by dmake\n\n"; + fout1 << "HEADERS += $$PWD/check.h \\\n"; + for (unsigned int i = 0; i < libfiles.size(); ++i) + { + std::string fname(libfiles[i].substr(4)); + if (fname.find(".cpp") == std::string::npos) + continue; // shouldn't happen + fname.erase(fname.find(".cpp")); + fout1 << std::string(11,' ') << "$$PWD/" << fname << ".h"; + if (i < libfiles.size() - 1) + fout1 << " \\\n"; + } + fout1 << "\n\nSOURCES += "; + for (unsigned int i = 0; i < libfiles.size(); ++i) + { + fout1 << "$$PWD/" << libfiles[i].substr(4); + if (i < libfiles.size() - 1) + fout1 << " \\\n" << std::string(11, ' '); + } + fout1 << "\n"; + } + } + + std::ofstream fout("Makefile"); // more warnings.. -Wfloat-equal -Wcast-qual -Wsign-conversion -Wlogical-op