Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case
This commit is contained in:
parent
48eb7fc7d7
commit
df847671b4
@ -475,6 +475,17 @@ cmNinjaTargetGenerator
|
|||||||
emptyDeps,
|
emptyDeps,
|
||||||
orderOnlyDeps,
|
orderOnlyDeps,
|
||||||
vars);
|
vars);
|
||||||
|
|
||||||
|
if(const char* objectOutputs = source->GetProperty("OBJECT_OUTPUTS")) {
|
||||||
|
std::vector<std::string> outputList;
|
||||||
|
cmSystemTools::ExpandListArgument(objectOutputs, outputList);
|
||||||
|
std::transform(outputList.begin(), outputList.end(), outputList.begin(),
|
||||||
|
MapToNinjaPath());
|
||||||
|
cmGlobalNinjaGenerator::WritePhonyBuild(this->GetBuildFileStream(),
|
||||||
|
"Additional output files.",
|
||||||
|
outputList,
|
||||||
|
outputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -47,7 +47,8 @@ SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
|
|||||||
|
|
||||||
# Setup dependencies for precompiled header creation and use. The VS
|
# Setup dependencies for precompiled header creation and use. The VS
|
||||||
# IDE takes care of this automatically.
|
# IDE takes care of this automatically.
|
||||||
IF("${CMAKE_GENERATOR}" MATCHES "Makefile")
|
IF("${CMAKE_GENERATOR}" MATCHES "Makefile" OR
|
||||||
|
"${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||||
# This source file creates the precompiled header as a side-effect.
|
# This source file creates the precompiled header as a side-effect.
|
||||||
SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
|
SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
|
||||||
OBJECT_OUTPUTS "${PCH_DIR}/foo_precompiled.pch")
|
OBJECT_OUTPUTS "${PCH_DIR}/foo_precompiled.pch")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user