mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
Swift/Ninja: Add description to Swift object build steps
By default, Ninja displays the full build command for the object which is very verbose. Warnings are often lost in the noise, and compile errors take some searching to find. If a build step fails, Ninja will still print out the full build command, so there's no loss of useful information. Fixes: #25853
This commit is contained in:
@@ -1992,6 +1992,11 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
|
|||||||
std::string const moduleFilepath =
|
std::string const moduleFilepath =
|
||||||
this->ConvertToNinjaPath(cmStrCat(moduleDirectory, '/', moduleFilename));
|
this->ConvertToNinjaPath(cmStrCat(moduleDirectory, '/', moduleFilename));
|
||||||
|
|
||||||
|
vars.emplace("description",
|
||||||
|
cmStrCat("Building Swift Module '", moduleName, "' with ",
|
||||||
|
sources.size(),
|
||||||
|
sources.size() == 1 ? " source" : " sources"));
|
||||||
|
|
||||||
bool const isSingleOutput = [this, compileMode]() -> bool {
|
bool const isSingleOutput = [this, compileMode]() -> bool {
|
||||||
bool isMultiThread = false;
|
bool isMultiThread = false;
|
||||||
if (cmValue numThreadStr =
|
if (cmValue numThreadStr =
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
.*Building Swift object A.swiftmodule CMakeFiles(/|\\)A.dir(/|\\)a.swift.o(bj)?
|
.*Building Swift Module 'A' with 1 source
|
||||||
.*Building Swift object B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)b.swift.o(bj)?
|
.*Building Swift Module 'B' with 1 source
|
||||||
FAILED: B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)b.swift.o(bj)?
|
FAILED: B.swiftmodule CMakeFiles(/|\\)B.dir(/|\\)b.swift.o(bj)?
|
||||||
|
|||||||
Reference in New Issue
Block a user