dmake: generate the lib/lib.pri file
This commit is contained in:
parent
40bb5144e1
commit
5254822bed
|
@ -1,4 +1,4 @@
|
||||||
# Common project include with headers and sources
|
# no manual edits - this file is autogenerated by dmake
|
||||||
|
|
||||||
HEADERS += $$PWD/check.h \
|
HEADERS += $$PWD/check.h \
|
||||||
$$PWD/checkautovariables.h \
|
$$PWD/checkautovariables.h \
|
||||||
|
@ -11,7 +11,6 @@ HEADERS += $$PWD/check.h \
|
||||||
$$PWD/checkother.h \
|
$$PWD/checkother.h \
|
||||||
$$PWD/checkstl.h \
|
$$PWD/checkstl.h \
|
||||||
$$PWD/checkunusedfunctions.h \
|
$$PWD/checkunusedfunctions.h \
|
||||||
$$PWD/classinfo.h \
|
|
||||||
$$PWD/cppcheck.h \
|
$$PWD/cppcheck.h \
|
||||||
$$PWD/errorlogger.h \
|
$$PWD/errorlogger.h \
|
||||||
$$PWD/executionpath.h \
|
$$PWD/executionpath.h \
|
||||||
|
|
|
@ -106,6 +106,36 @@ int main()
|
||||||
std::vector<std::string> testfiles;
|
std::vector<std::string> testfiles;
|
||||||
getCppFiles(testfiles, "test/");
|
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");
|
std::ofstream fout("Makefile");
|
||||||
|
|
||||||
// more warnings.. -Wfloat-equal -Wcast-qual -Wsign-conversion -Wlogical-op
|
// more warnings.. -Wfloat-equal -Wcast-qual -Wsign-conversion -Wlogical-op
|
||||||
|
|
Loading…
Reference in New Issue