mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 14:50:15 -05:00
Revise C++ coding style using clang-format-18
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Fixes: #26123
This commit is contained in:
@@ -551,8 +551,7 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
}
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"CPACK_CREATE_DESKTOP_LINKS: "
|
||||
<< "not set" << std::endl);
|
||||
"CPACK_CREATE_DESKTOP_LINKS: " << "not set" << std::endl);
|
||||
}
|
||||
|
||||
std::ostringstream str;
|
||||
|
||||
@@ -1733,9 +1733,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
||||
"run covbr: " << std::endl, this->Quiet);
|
||||
|
||||
if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"error running covbr for."
|
||||
<< "\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n");
|
||||
return -1;
|
||||
}
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "cmCursesWidget.h"
|
||||
#include "cmStateTypes.h"
|
||||
|
||||
#define ctrl(z) ((z)&037)
|
||||
#define ctrl(z) ((z) & 037)
|
||||
|
||||
cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left,
|
||||
int top)
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
protected:
|
||||
// Implement virtual methods from the superclass.
|
||||
void ComplainAboutDuplicateTarget(
|
||||
std::string const& /*targetName*/) const override{};
|
||||
std::string const& /*targetName*/) const override {};
|
||||
void ReportError(std::string const& errorMessage) const override;
|
||||
|
||||
bool GenerateMainFile(std::ostream& os) override;
|
||||
|
||||
@@ -830,7 +830,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
// flag
|
||||
needTestLanguage[lang] = true;
|
||||
} // end if(!this->GetLanguageEnabled(lang) )
|
||||
} // end loop over languages
|
||||
} // end loop over languages
|
||||
|
||||
// **** Load the system specific information if not yet loaded
|
||||
if (!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED")) {
|
||||
@@ -939,7 +939,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
cmSystemTools::RemoveFile(compilerLangFile);
|
||||
}
|
||||
} // end if in try compile
|
||||
} // end need test language
|
||||
} // end need test language
|
||||
|
||||
// load linker configuration, if required
|
||||
if (mf->GetDefinition(cmStrCat("CMAKE_", lang, "_USE_LINKER_INFORMATION"))
|
||||
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
public:
|
||||
Error(Location loc, std::string errMsg)
|
||||
: location(loc)
|
||||
, message(std::move(errMsg)){};
|
||||
, message(std::move(errMsg)) {};
|
||||
Error(std::string errMsg)
|
||||
: location({ -1, -1 })
|
||||
, message(std::move(errMsg)){};
|
||||
, message(std::move(errMsg)) {};
|
||||
std::string GetErrorMessage() const
|
||||
{
|
||||
std::string output = message;
|
||||
|
||||
@@ -1503,7 +1503,7 @@ cmSystemTools::RenameResult cmSystemTools::RenameFile(
|
||||
{
|
||||
#ifdef _WIN32
|
||||
# ifndef INVALID_FILE_ATTRIBUTES
|
||||
# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
# define INVALID_FILE_ATTRIBUTES ((DWORD) - 1)
|
||||
# endif
|
||||
std::wstring const oldname_wstr =
|
||||
SystemTools::ConvertToWindowsExtendedPath(oldname);
|
||||
|
||||
+1
-1
@@ -26,6 +26,6 @@ public:
|
||||
and to encode dates until the year 10000 in the patch level. */
|
||||
#define CMake_VERSION_ENCODE_BASE KWIML_INT_UINT64_C(100000000)
|
||||
#define CMake_VERSION_ENCODE(major, minor, patch) \
|
||||
((((major)*1000u) * CMake_VERSION_ENCODE_BASE) + \
|
||||
((((major) * 1000u) * CMake_VERSION_ENCODE_BASE) + \
|
||||
(((minor) % 1000u) * CMake_VERSION_ENCODE_BASE) + \
|
||||
(((patch) % CMake_VERSION_ENCODE_BASE)))
|
||||
|
||||
Reference in New Issue
Block a user