mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
cmTransformDepfile: warn when a depfile is not written to
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
#include "cmGccDepfileReaderTypes.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmLocalGenerator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmMessageType.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
namespace {
|
||||
@@ -121,6 +124,10 @@ bool cmTransformDepfile(cmDepfileFormat format, const cmLocalGenerator& lg,
|
||||
return false;
|
||||
}
|
||||
content = *std::move(result);
|
||||
} else {
|
||||
lg.GetMakefile()->IssueMessage(
|
||||
MessageType::WARNING,
|
||||
cmStrCat("Expected depfile does not exist.\n ", infile));
|
||||
}
|
||||
|
||||
cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(outfile));
|
||||
|
||||
4
Tests/RunCMake/TransformDepfile/noexist-gcc-stderr.txt
Normal file
4
Tests/RunCMake/TransformDepfile/noexist-gcc-stderr.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
^CMake Warning:
|
||||
Expected depfile does not exist.
|
||||
|
||||
.*/Tests/RunCMake/TransformDepfile/noexist.d$
|
||||
Reference in New Issue
Block a user