serenity/Ports/cmake/patches/0023-lround.patch
AnotherTest 80d6f46d4e Ports: Add a cmake port
Yes, you build this *inside* serenity.
2021-02-15 17:32:56 +01:00

26 lines
1.3 KiB
Diff

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 5e40712..972927b 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1500,7 +1500,7 @@ public:
long OldPercentage = this->CurrentPercentage;
if (total > 0.0) {
- this->CurrentPercentage = std::lround(value / total * 100.0);
+ this->CurrentPercentage = trunc(round(value / total * 100.0));
if (this->CurrentPercentage > 100) {
// Avoid extra progress reports for unexpected data beyond total.
this->CurrentPercentage = 100;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 4d1a589..0209bec 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -581,7 +581,7 @@ void cmCTestTestHandler::LogTestSummary(const std::vector<std::string>& passed,
}
cmCTestLog(this->CTest, HANDLER_OUTPUT,
std::endl
- << passColorCode << std::lround(percent) << "% tests passed"
+ << passColorCode << trunc(round(percent)) << "% tests passed"
<< this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR)
<< ", " << failedColorCode << failed.size() << " tests failed"
<< this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR)