mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
ninja: name dyndep internal files using the object file
Now that preprocessing outputs are not necessarily used all the way through, the output name is a better base name to use for these files.
This commit is contained in:
@@ -1577,10 +1577,10 @@ Compilation of source files within a target is split into the following steps:
|
||||
--obj=$OBJ_FILE --ddi=$DYNDEP_INTERMEDIATE_FILE \
|
||||
--lang=Fortran
|
||||
|
||||
build src.f90-pp.f90 | src.f90-pp.f90.ddi: Fortran_PREPROCESS src.f90
|
||||
build src.f90-pp.f90 | src.f90.o.ddi: Fortran_PREPROCESS src.f90
|
||||
OBJ_FILE = src.f90.o
|
||||
DEP_FILE = src.f90-pp.f90.d
|
||||
DYNDEP_INTERMEDIATE_FILE = src.f90-pp.f90.ddi
|
||||
DEP_FILE = src.f90.o.d
|
||||
DYNDEP_INTERMEDIATE_FILE = src.f90.o.ddi
|
||||
|
||||
The ``cmake -E cmake_ninja_depends`` tool reads the preprocessed output
|
||||
and generates the ninja depfile for preprocessor dependencies. It also
|
||||
@@ -1596,7 +1596,7 @@ Compilation of source files within a target is split into the following steps:
|
||||
command = cmake -E cmake_ninja_dyndep \
|
||||
--tdi=FortranDependInfo.json --lang=Fortran --dd=$out $in
|
||||
|
||||
build Fortran.dd: Fortran_DYNDEP src1.f90-pp.f90.ddi src2.f90-pp.f90.ddi
|
||||
build Fortran.dd: Fortran_DYNDEP src1.f90.o.ddi src2.f90.o.ddi
|
||||
|
||||
The ``cmake -E cmake_ninja_dyndep`` tool reads the "ddi" files from all
|
||||
sources in the target and the ``FortranModules.json`` files from targets
|
||||
|
||||
@@ -1113,7 +1113,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
||||
|
||||
// Explicit preprocessing always uses a depfile.
|
||||
ppVars["DEP_FILE"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||
ppFileName + ".d", cmOutputConverter::SHELL);
|
||||
objectFileName + ".d", cmOutputConverter::SHELL);
|
||||
if (compilePP) {
|
||||
// The actual compilation does not need a depfile because it
|
||||
// depends on the already-preprocessed source.
|
||||
@@ -1126,7 +1126,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
||||
ppVars["OBJ_FILE"] = objectFileName;
|
||||
|
||||
// Tell dependency scanner where to store dyndep intermediate results.
|
||||
std::string const ddiFile = ppFileName + ".ddi";
|
||||
std::string const ddiFile = objectFileName + ".ddi";
|
||||
ppVars["DYNDEP_INTERMEDIATE_FILE"] = ddiFile;
|
||||
ppImplicitOuts.push_back(ddiFile);
|
||||
this->DDIFiles[language].push_back(ddiFile);
|
||||
|
||||
Reference in New Issue
Block a user