MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / compilefiles

Function compilefiles

tools/dmake/dmake.cpp:149–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149static void compilefiles(std::ostream &fout, const std::vector<std::string> &files, const std::string &args)
150{
151 for (const std::string &file : files) {
152 const bool external(startsWith(file,"externals/") || startsWith(file,"../externals/"));
153 const bool tinyxml2(startsWith(file,"externals/tinyxml2/") || startsWith(file,"../externals/tinyxml2/"));
154 fout << objfile(file) << ": " << file;
155 std::vector<std::string> depfiles;
156 getDeps(file, depfiles);
157 std::sort(depfiles.begin(), depfiles.end());
158 for (const std::string &depfile : depfiles)
159 fout << " " << depfile;
160 std::string additional;
161 if (external)
162 additional += " -w"; // do not show any warnings for external
163 if (tinyxml2)
164 additional += " -D_LARGEFILE_SOURCE"; // required for fseeko() and ftello() (on Cygwin)
165 fout << "\n\t$(CXX) " << args << " $(CPPFLAGS) $(CXXFLAGS)" << additional << " -c -o $@ " << builddir(file) << "\n\n";
166 }
167}
168
169static std::string getCppFiles(std::vector<std::string> &files, const std::string &path, bool recursive)
170{

Callers 2

write_ossfuzz_makefileFunction · 0.85
mainFunction · 0.85

Calls 6

objfileFunction · 0.85
getDepsFunction · 0.85
builddirFunction · 0.85
startsWithFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected