Skip to content

Commit dadb5e9

Browse files
authored
Add source file in UTBot test`s Makefiles dependencies (#542)
* Add source file in UTBot test`s Makefiles dependencies * Make source path relative.
1 parent 37a8569 commit dadb5e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/printers/NativeMakefilePrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ namespace printer {
271271
std::string postCompileAction =
272272
stringFormat("mv -f %s %s", temporaryDependencyFile, dependencyFile);
273273

274-
declareTarget(compileCommand.getOutput(), { compileCommand.getSourcePath(), dependencyFile },
274+
auto source = getRelativePath(compilationUnitInfo.command.getSourcePath());
275+
276+
declareTarget(compileCommand.getOutput(), { compileCommand.getSourcePath(), dependencyFile, source },
275277
{ makingDependencyDirectory,
276278
compileCommand.toStringWithChangingDirectoryToNew(
277279
getRelativePath(compileCommand.getDirectory())),

0 commit comments

Comments
 (0)