File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ cppcheck: $(EXTOBJ) $(LIBOBJ) $(CLIOBJ)
348348
349349all : cppcheck testrunner
350350
351- testrunner : $(EXTOBJ ) $(TESTOBJ ) $(LIBOBJ ) cli/executor .o cli/processexecutor .o cli/singleexecutor .o cli/threadexecutor .o cli/cmdlineparser .o cli/cppcheckexecutor .o cli/sehwrapper .o cli/signalhandler .o cli/stacktrace.o cli/filelister .o
351+ testrunner : $(EXTOBJ ) $(TESTOBJ ) $(LIBOBJ ) cli/cmdlineparser .o cli/cppcheckexecutor .o cli/executor .o cli/filelister .o cli/processexecutor .o cli/sehwrapper .o cli/signalhandler .o cli/singleexecutor .o cli/stacktrace.o cli/threadexecutor .o
352352 $(CXX ) $(CPPFLAGS ) $(CXXFLAGS ) -o $@ $^ $(LIBS ) $(LDFLAGS ) $(RDYNAMIC )
353353
354354test : all
Original file line number Diff line number Diff line change @@ -742,8 +742,15 @@ int main(int argc, char **argv)
742742 fout << " cppcheck: $(EXTOBJ) $(LIBOBJ) $(CLIOBJ)\n " ;
743743 fout << " \t $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n " ;
744744 fout << " all:\t cppcheck testrunner\n\n " ;
745- // TODO: generate from clifiles
746- fout << " testrunner: $(EXTOBJ) $(TESTOBJ) $(LIBOBJ) cli/executor.o cli/processexecutor.o cli/singleexecutor.o cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/sehwrapper.o cli/signalhandler.o cli/stacktrace.o cli/filelister.o\n " ;
745+ std::string testrunner_clifiles_o;
746+ for (const std::string &clifile: clifiles) {
747+ if (clifile == " cli/main.cpp" )
748+ continue ;
749+ testrunner_clifiles_o += ' ' ;
750+ const std::string o = clifile.substr (0 , clifile.length ()-3 ) + ' o' ;
751+ testrunner_clifiles_o += o;
752+ }
753+ fout << " testrunner: $(EXTOBJ) $(TESTOBJ) $(LIBOBJ)" << testrunner_clifiles_o << " \n " ;
747754 fout << " \t $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n " ;
748755 fout << " test:\t all\n " ;
749756 fout << " \t ./testrunner\n\n " ;
You can’t perform that action at this time.
0 commit comments