diff --git a/.clang-format b/.clang-format
index 5beee0b633bf1dce7bfdc2da8e73cf4f5b4d0f24..9940fadd1f7d368290ecc9434b702bcb29c6d8a8 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,5 +1,5 @@
 ---
-# This configuration requires clang-format version 15 exactly.
+# This configuration requires clang-format version 18 exactly.
 BasedOnStyle: Mozilla
 AlignOperands: false
 AllowShortFunctionsOnASingleLine: InlineOnly
@@ -16,6 +16,7 @@ BraceWrapping:
 BreakBeforeBraces: Custom
 ColumnLimit: 79
 IndentPPDirectives: AfterHash
+QualifierAlignment: Right
 SortUsingDeclarations: false
 SpaceAfterTemplateKeyword: true
 Standard: Cpp03
diff --git a/.gitattributes b/.gitattributes
index 1ae02445f182779c67d65a0032d089682b6e47aa..82a11df4b4a95ce8434f4a331383e741e419fe6e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,7 +4,7 @@
 .hooks*          export-ignore
 
 # Custom attribute to mark sources as using the kwsys C code style.
-[attr]kwsys-c-style  whitespace=tab-in-indent  format.clang-format=15
+[attr]kwsys-c-style  whitespace=tab-in-indent  format.clang-format=18
 
 /GitSetup        export-ignore
 /*.sh            export-ignore eol=lf
diff --git a/Base64.c b/Base64.c
index 42650184a57946458f5c9dbf87c5de30d880b453..c07eedcc79c019d272ef3c542bf33c4567120436 100644
--- a/Base64.c
+++ b/Base64.c
@@ -9,12 +9,12 @@
 #  include "Base64.h.in"
 #endif
 
-static const unsigned char kwsysBase64EncodeTable[65] =
+static unsigned char const kwsysBase64EncodeTable[65] =
   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   "abcdefghijklmnopqrstuvwxyz"
   "0123456789+/";
 
-static const unsigned char kwsysBase64DecodeTable[256] = {
+static unsigned char const kwsysBase64DecodeTable[256] = {
   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -49,7 +49,7 @@ static unsigned char kwsysBase64DecodeChar(unsigned char c)
 }
 
 /* Encode 3 bytes into a 4 byte string. */
-void kwsysBase64_Encode3(const unsigned char* src, unsigned char* dest)
+void kwsysBase64_Encode3(unsigned char const* src, unsigned char* dest)
 {
   dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
   dest[1] =
@@ -60,7 +60,7 @@ void kwsysBase64_Encode3(const unsigned char* src, unsigned char* dest)
 }
 
 /* Encode 2 bytes into a 4 byte string. */
-void kwsysBase64_Encode2(const unsigned char* src, unsigned char* dest)
+void kwsysBase64_Encode2(unsigned char const* src, unsigned char* dest)
 {
   dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
   dest[1] =
@@ -70,7 +70,7 @@ void kwsysBase64_Encode2(const unsigned char* src, unsigned char* dest)
 }
 
 /* Encode 1 bytes into a 4 byte string. */
-void kwsysBase64_Encode1(const unsigned char* src, unsigned char* dest)
+void kwsysBase64_Encode1(unsigned char const* src, unsigned char* dest)
 {
   dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F);
   dest[1] = kwsysBase64EncodeChar(((src[0] << 4) & 0x30));
@@ -88,11 +88,11 @@ void kwsysBase64_Encode1(const unsigned char* src, unsigned char* dest)
    actually knowing how much data to expect (if the input is not a multiple of
    3 bytes then the extra padding needed to complete the encode 4 bytes will
    stop the decoding anyway).  */
-size_t kwsysBase64_Encode(const unsigned char* input, size_t length,
+size_t kwsysBase64_Encode(unsigned char const* input, size_t length,
                           unsigned char* output, int mark_end)
 {
-  const unsigned char* ptr = input;
-  const unsigned char* end = input + length;
+  unsigned char const* ptr = input;
+  unsigned char const* end = input + length;
   unsigned char* optr = output;
 
   /* Encode complete triplet */
@@ -128,7 +128,7 @@ size_t kwsysBase64_Encode(const unsigned char* input, size_t length,
 }
 
 /* Decode 4 bytes into a 3 byte string. */
-int kwsysBase64_Decode3(const unsigned char* src, unsigned char* dest)
+int kwsysBase64_Decode3(unsigned char const* src, unsigned char* dest)
 {
   unsigned char d0;
   unsigned char d1;
@@ -172,16 +172,16 @@ int kwsysBase64_Decode3(const unsigned char* src, unsigned char* dest)
    'length' parameter is ignored. This enables the caller to decode a stream
    without actually knowing how much decoded data to expect (of course, the
    buffer must be large enough). */
-size_t kwsysBase64_Decode(const unsigned char* input, size_t length,
+size_t kwsysBase64_Decode(unsigned char const* input, size_t length,
                           unsigned char* output, size_t max_input_length)
 {
-  const unsigned char* ptr = input;
+  unsigned char const* ptr = input;
   unsigned char* optr = output;
 
   /* Decode complete triplet */
 
   if (max_input_length) {
-    const unsigned char* end = input + max_input_length;
+    unsigned char const* end = input + max_input_length;
     while (ptr < end) {
       int len = kwsysBase64_Decode3(ptr, optr);
       optr += len;
diff --git a/Base64.h.in b/Base64.h.in
index 729f972978263f126a2d8ed645a582d462f870f5..da47f2add12922658b537e75e66b4a2418a4d8d7 100644
--- a/Base64.h.in
+++ b/Base64.h.in
@@ -32,19 +32,19 @@ extern "C" {
 /**
  * Encode 3 bytes into a 4 byte string.
  */
-kwsysEXPORT void kwsysBase64_Encode3(const unsigned char* src,
+kwsysEXPORT void kwsysBase64_Encode3(unsigned char const* src,
                                      unsigned char* dest);
 
 /**
  * Encode 2 bytes into a 4 byte string.
  */
-kwsysEXPORT void kwsysBase64_Encode2(const unsigned char* src,
+kwsysEXPORT void kwsysBase64_Encode2(unsigned char const* src,
                                      unsigned char* dest);
 
 /**
  * Encode 1 bytes into a 4 byte string.
  */
-kwsysEXPORT void kwsysBase64_Encode1(const unsigned char* src,
+kwsysEXPORT void kwsysBase64_Encode1(unsigned char const* src,
                                      unsigned char* dest);
 
 /**
@@ -60,7 +60,7 @@ kwsysEXPORT void kwsysBase64_Encode1(const unsigned char* src,
  * the extra padding needed to complete the encode 4 bytes will stop
  * the decoding anyway).
  */
-kwsysEXPORT size_t kwsysBase64_Encode(const unsigned char* input,
+kwsysEXPORT size_t kwsysBase64_Encode(unsigned char const* input,
                                       size_t length, unsigned char* output,
                                       int mark_end);
 
@@ -68,7 +68,7 @@ kwsysEXPORT size_t kwsysBase64_Encode(const unsigned char* input,
  * Decode 4 bytes into a 3 byte string.  Returns the number of bytes
  * actually decoded.
  */
-kwsysEXPORT int kwsysBase64_Decode3(const unsigned char* src,
+kwsysEXPORT int kwsysBase64_Decode3(unsigned char const* src,
                                     unsigned char* dest);
 
 /**
@@ -83,7 +83,7 @@ kwsysEXPORT int kwsysBase64_Decode3(const unsigned char* src,
  * much decoded data to expect (of course, the buffer must be large
  * enough).
  */
-kwsysEXPORT size_t kwsysBase64_Decode(const unsigned char* input,
+kwsysEXPORT size_t kwsysBase64_Decode(unsigned char const* input,
                                       size_t length, unsigned char* output,
                                       size_t max_input_length);
 
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index d62afa5751f8277bb87519fd89a5697806eba6a5..e9c58a3802a34b8d48e51e8cf616ff2c9365af0c 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -27,7 +27,7 @@ copies of KWSys within dependent projects can be updated to get the changes.
 Code Style
 ==========
 
-We use `clang-format`_ version **15** to define our style for C++ code in
+We use `clang-format`_ version **18** to define our style for C++ code in
 the KWSys source tree.  See the `.clang-format`_ configuration file for
 our style settings.  Use the `clang-format.bash`_ script to format source
 code.  It automatically runs ``clang-format`` on the set of source files
diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx
index 61703ada261e76807f7c62f7cb4738a67640a440..d39a2794b91cce4ba62a51788becbbf253d9a7db 100644
--- a/CommandLineArguments.cxx
+++ b/CommandLineArguments.cxx
@@ -42,13 +42,13 @@ namespace KWSYS_NAMESPACE {
 
 struct CommandLineArgumentsCallbackStructure
 {
-  const char* Argument;
+  char const* Argument;
   int ArgumentType;
   CommandLineArguments::CallbackType Callback;
   void* CallData;
   void* Variable;
   int VariableType;
-  const char* Help;
+  char const* Help;
 };
 
 class CommandLineArgumentsVectorOfStrings : public std::vector<std::string>
@@ -97,7 +97,7 @@ CommandLineArguments::~CommandLineArguments()
   delete this->Internals;
 }
 
-void CommandLineArguments::Initialize(int argc, const char* const argv[])
+void CommandLineArguments::Initialize(int argc, char const* const argv[])
 {
   int cc;
 
@@ -110,7 +110,7 @@ void CommandLineArguments::Initialize(int argc, const char* const argv[])
 
 void CommandLineArguments::Initialize(int argc, char* argv[])
 {
-  this->Initialize(argc, static_cast<const char* const*>(argv));
+  this->Initialize(argc, static_cast<char const* const*>(argv));
 }
 
 void CommandLineArguments::Initialize()
@@ -119,13 +119,13 @@ void CommandLineArguments::Initialize()
   this->Internals->LastArgument = 0;
 }
 
-void CommandLineArguments::ProcessArgument(const char* arg)
+void CommandLineArguments::ProcessArgument(char const* arg)
 {
   this->Internals->Argv.push_back(arg);
 }
 
 bool CommandLineArguments::GetMatchedArguments(
-  std::vector<std::string>* matches, const std::string& arg)
+  std::vector<std::string>* matches, std::string const& arg)
 {
   matches->clear();
   CommandLineArguments::Internal::CallbacksMap::iterator it;
@@ -133,7 +133,7 @@ bool CommandLineArguments::GetMatchedArguments(
   // Does the argument match to any we know about?
   for (it = this->Internals->Callbacks.begin();
        it != this->Internals->Callbacks.end(); ++it) {
-    const CommandLineArguments::Internal::String& parg = it->first;
+    CommandLineArguments::Internal::String const& parg = it->first;
     CommandLineArgumentsCallbackStructure* cs = &it->second;
     if (cs->ArgumentType == CommandLineArguments::NO_ARGUMENT ||
         cs->ArgumentType == CommandLineArguments::SPACE_ARGUMENT) {
@@ -155,7 +155,7 @@ int CommandLineArguments::Parse()
     this->Internals->UnusedArguments.clear();
   }
   for (cc = 0; cc < this->Internals->Argv.size(); cc++) {
-    const std::string& arg = this->Internals->Argv[cc];
+    std::string const& arg = this->Internals->Argv[cc];
     CommandLineArguments_DEBUG("Process argument: " << arg);
     this->Internals->LastArgument = cc;
     if (this->GetMatchedArguments(&matches, arg)) {
@@ -174,7 +174,7 @@ int CommandLineArguments::Parse()
       // additional value
       CommandLineArgumentsCallbackStructure* cs =
         &this->Internals->Callbacks[matches[maxidx]];
-      const std::string& sarg = matches[maxidx];
+      std::string const& sarg = matches[maxidx];
       if (cs->Argument != sarg) {
         abort();
       }
@@ -220,7 +220,7 @@ int CommandLineArguments::Parse()
           // Suck in all the rest of the arguments
           CommandLineArguments_DEBUG("This is a multi argument: " << arg);
           for (cc++; cc < this->Internals->Argv.size(); ++cc) {
-            const std::string& marg = this->Internals->Argv[cc];
+            std::string const& marg = this->Internals->Argv[cc];
             CommandLineArguments_DEBUG(
               " check multi argument value: " << marg);
             if (this->GetMatchedArguments(&matches, marg)) {
@@ -320,13 +320,13 @@ void CommandLineArguments::DeleteRemainingArguments(int argc, char*** argv)
   for (cc = 0; cc < argc; ++cc) {
     delete[] (*argv)[cc];
   }
-  delete[] * argv;
+  delete[] *argv;
 }
 
-void CommandLineArguments::AddCallback(const char* argument,
+void CommandLineArguments::AddCallback(char const* argument,
                                        ArgumentTypeEnum type,
                                        CallbackType callback, void* call_data,
-                                       const char* help)
+                                       char const* help)
 {
   CommandLineArgumentsCallbackStructure s;
   s.Argument = argument;
@@ -341,10 +341,10 @@ void CommandLineArguments::AddCallback(const char* argument,
   this->GenerateHelp();
 }
 
-void CommandLineArguments::AddArgument(const char* argument,
+void CommandLineArguments::AddArgument(char const* argument,
                                        ArgumentTypeEnum type,
                                        VariableTypeEnum vtype, void* variable,
-                                       const char* help)
+                                       char const* help)
 {
   CommandLineArgumentsCallbackStructure s;
   s.Argument = argument;
@@ -416,7 +416,7 @@ void CommandLineArguments::SetUnknownArgumentCallback(
   this->Internals->UnknownArgumentCallback = callback;
 }
 
-const char* CommandLineArguments::GetHelp(const char* arg)
+char const* CommandLineArguments::GetHelp(char const* arg)
 {
   auto it = this->Internals->Callbacks.find(arg);
   if (it == this->Internals->Callbacks.end()) {
@@ -445,7 +445,7 @@ void CommandLineArguments::SetLineLength(unsigned int ll)
   this->GenerateHelp();
 }
 
-const char* CommandLineArguments::GetArgv0()
+char const* CommandLineArguments::GetArgv0()
 {
   return this->Internals->Argv0.c_str();
 }
@@ -547,7 +547,7 @@ void CommandLineArguments::GenerateHelp()
       }
       str << "  " << argument.substr(0, maxstrlen) << "  ";
     }
-    const char* ptr = this->Internals->Callbacks[mpit->first].Help;
+    char const* ptr = this->Internals->Callbacks[mpit->first].Help;
     size_t len = strlen(ptr);
     int cnt = 0;
     while (len > 0) {
@@ -598,7 +598,7 @@ void CommandLineArguments::GenerateHelp()
 }
 
 void CommandLineArguments::PopulateVariable(bool* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   if (value == "1" || value == "ON" || value == "on" || value == "On" ||
       value == "TRUE" || value == "true" || value == "True" ||
@@ -610,7 +610,7 @@ void CommandLineArguments::PopulateVariable(bool* variable,
 }
 
 void CommandLineArguments::PopulateVariable(int* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   char* res = nullptr;
   *variable = static_cast<int>(strtol(value.c_str(), &res, 10));
@@ -621,7 +621,7 @@ void CommandLineArguments::PopulateVariable(int* variable,
 }
 
 void CommandLineArguments::PopulateVariable(double* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   char* res = nullptr;
   *variable = strtod(value.c_str(), &res);
@@ -632,21 +632,21 @@ void CommandLineArguments::PopulateVariable(double* variable,
 }
 
 void CommandLineArguments::PopulateVariable(char** variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
-  delete[] * variable;
+  delete[] *variable;
   *variable = new char[value.size() + 1];
   strcpy(*variable, value.c_str());
 }
 
 void CommandLineArguments::PopulateVariable(std::string* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   *variable = value;
 }
 
 void CommandLineArguments::PopulateVariable(std::vector<bool>* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   bool val = false;
   if (value == "1" || value == "ON" || value == "on" || value == "On" ||
@@ -658,7 +658,7 @@ void CommandLineArguments::PopulateVariable(std::vector<bool>* variable,
 }
 
 void CommandLineArguments::PopulateVariable(std::vector<int>* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   char* res = nullptr;
   variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10)));
@@ -669,7 +669,7 @@ void CommandLineArguments::PopulateVariable(std::vector<int>* variable,
 }
 
 void CommandLineArguments::PopulateVariable(std::vector<double>* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   char* res = nullptr;
   variable->push_back(strtod(value.c_str(), &res));
@@ -680,7 +680,7 @@ void CommandLineArguments::PopulateVariable(std::vector<double>* variable,
 }
 
 void CommandLineArguments::PopulateVariable(std::vector<char*>* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   char* var = new char[value.size() + 1];
   strcpy(var, value.c_str());
@@ -688,13 +688,13 @@ void CommandLineArguments::PopulateVariable(std::vector<char*>* variable,
 }
 
 void CommandLineArguments::PopulateVariable(std::vector<std::string>* variable,
-                                            const std::string& value)
+                                            std::string const& value)
 {
   variable->push_back(value);
 }
 
 bool CommandLineArguments::PopulateVariable(
-  CommandLineArgumentsCallbackStructure* cs, const char* value)
+  CommandLineArgumentsCallbackStructure* cs, char const* value)
 {
   // Call the callback
   if (cs->Callback) {
diff --git a/CommandLineArguments.hxx.in b/CommandLineArguments.hxx.in
index 7db901556407faaf9efce539ee3c5ffc3931eb22..0c06e46d8fdec5c118ed12e03ae6a217b1498d0e 100644
--- a/CommandLineArguments.hxx.in
+++ b/CommandLineArguments.hxx.in
@@ -62,8 +62,8 @@ public:
   CommandLineArguments();
   ~CommandLineArguments();
 
-  CommandLineArguments(const CommandLineArguments&) = delete;
-  CommandLineArguments& operator=(const CommandLineArguments&) = delete;
+  CommandLineArguments(CommandLineArguments const&) = delete;
+  CommandLineArguments& operator=(CommandLineArguments const&) = delete;
 
   /**
    * Various argument types.
@@ -100,14 +100,14 @@ public:
   /**
    * Prototypes for callbacks for callback interface.
    */
-  typedef int (*CallbackType)(const char* argument, const char* value,
+  typedef int (*CallbackType)(char const* argument, char const* value,
                               void* call_data);
-  typedef int (*ErrorCallbackType)(const char* argument, void* client_data);
+  typedef int (*ErrorCallbackType)(char const* argument, void* client_data);
 
   /**
    * Initialize internal data structures. This should be called before parsing.
    */
-  void Initialize(int argc, const char* const argv[]);
+  void Initialize(int argc, char const* const argv[]);
   void Initialize(int argc, char* argv[]);
 
   /**
@@ -116,7 +116,7 @@ public:
    * are not available.
    */
   void Initialize();
-  void ProcessArgument(const char* arg);
+  void ProcessArgument(char const* arg);
 
   /**
    * This method will parse arguments and call appropriate methods.
@@ -129,56 +129,56 @@ public:
    * argument help specifies the help string used with this option. The
    * callback and call_data can be skipped.
    */
-  void AddCallback(const char* argument, ArgumentTypeEnum type,
-                   CallbackType callback, void* call_data, const char* help);
+  void AddCallback(char const* argument, ArgumentTypeEnum type,
+                   CallbackType callback, void* call_data, char const* help);
 
   /**
    * Add handler for argument which is going to set the variable to the
    * specified value. If the argument is specified, the option is casted to the
    * appropriate type.
    */
-  void AddArgument(const char* argument, ArgumentTypeEnum type, bool* variable,
-                   const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type, int* variable,
-                   const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   double* variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   char** variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::string* variable, const char* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type, bool* variable,
+                   char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type, int* variable,
+                   char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   double* variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   char** variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::string* variable, char const* help);
 
   /**
    * Add handler for argument which is going to set the variable to the
    * specified value. If the argument is specified, the option is casted to the
    * appropriate type. This will handle the multi argument values.
    */
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::vector<bool>* variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::vector<int>* variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::vector<double>* variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::vector<char*>* variable, const char* help);
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   std::vector<std::string>* variable, const char* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::vector<bool>* variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::vector<int>* variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::vector<double>* variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::vector<char*>* variable, char const* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   std::vector<std::string>* variable, char const* help);
 
   /**
    * Add handler for boolean argument. The argument does not take any option
    * and if it is specified, the value of the variable is true/1, otherwise it
    * is false/0.
    */
-  void AddBooleanArgument(const char* argument, bool* variable,
-                          const char* help);
-  void AddBooleanArgument(const char* argument, int* variable,
-                          const char* help);
-  void AddBooleanArgument(const char* argument, double* variable,
-                          const char* help);
-  void AddBooleanArgument(const char* argument, char** variable,
-                          const char* help);
-  void AddBooleanArgument(const char* argument, std::string* variable,
-                          const char* help);
+  void AddBooleanArgument(char const* argument, bool* variable,
+                          char const* help);
+  void AddBooleanArgument(char const* argument, int* variable,
+                          char const* help);
+  void AddBooleanArgument(char const* argument, double* variable,
+                          char const* help);
+  void AddBooleanArgument(char const* argument, char** variable,
+                          char const* help);
+  void AddBooleanArgument(char const* argument, std::string* variable,
+                          char const* help);
 
   /**
    * Set the callbacks for error handling.
@@ -205,8 +205,8 @@ public:
    * Return string containing help. If the argument is specified, only return
    * help for that argument.
    */
-  const char* GetHelp() { return this->Help.c_str(); }
-  const char* GetHelp(const char* arg);
+  char const* GetHelp() { return this->Help.c_str(); }
+  char const* GetHelp(char const* arg);
 
   /**
    * Get / Set the help line length. This length is used when generating the
@@ -219,7 +219,7 @@ public:
    * Get the executable name (argv0). This is only available when using
    * Initialize with argc/argv.
    */
-  const char* GetArgv0();
+  char const* GetArgv0();
 
   /**
    * Get index of the last argument parsed. This is the last argument that was
@@ -231,30 +231,30 @@ protected:
   void GenerateHelp();
 
   //! This is internal method that registers variable with argument
-  void AddArgument(const char* argument, ArgumentTypeEnum type,
-                   VariableTypeEnum vtype, void* variable, const char* help);
+  void AddArgument(char const* argument, ArgumentTypeEnum type,
+                   VariableTypeEnum vtype, void* variable, char const* help);
 
   bool GetMatchedArguments(std::vector<std::string>* matches,
-                           const std::string& arg);
+                           std::string const& arg);
 
   //! Populate individual variables
   bool PopulateVariable(CommandLineArgumentsCallbackStructure* cs,
-                        const char* value);
+                        char const* value);
 
   //! Populate individual variables of type ...
-  void PopulateVariable(bool* variable, const std::string& value);
-  void PopulateVariable(int* variable, const std::string& value);
-  void PopulateVariable(double* variable, const std::string& value);
-  void PopulateVariable(char** variable, const std::string& value);
-  void PopulateVariable(std::string* variable, const std::string& value);
-  void PopulateVariable(std::vector<bool>* variable, const std::string& value);
-  void PopulateVariable(std::vector<int>* variable, const std::string& value);
+  void PopulateVariable(bool* variable, std::string const& value);
+  void PopulateVariable(int* variable, std::string const& value);
+  void PopulateVariable(double* variable, std::string const& value);
+  void PopulateVariable(char** variable, std::string const& value);
+  void PopulateVariable(std::string* variable, std::string const& value);
+  void PopulateVariable(std::vector<bool>* variable, std::string const& value);
+  void PopulateVariable(std::vector<int>* variable, std::string const& value);
   void PopulateVariable(std::vector<double>* variable,
-                        const std::string& value);
+                        std::string const& value);
   void PopulateVariable(std::vector<char*>* variable,
-                        const std::string& value);
+                        std::string const& value);
   void PopulateVariable(std::vector<std::string>* variable,
-                        const std::string& value);
+                        std::string const& value);
 
   typedef CommandLineArgumentsInternal Internal;
   Internal* Internals;
diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in
index 49dbdf7ea5f0cfa9febe05568cd7890beea2883c..b0e3cd53bfa277b1ea8343e181b851860be48a82 100644
--- a/ConsoleBuf.hxx.in
+++ b/ConsoleBuf.hxx.in
@@ -34,14 +34,14 @@ public:
   class Manager
   {
   public:
-    Manager(std::basic_ios<CharT, Traits>& ios, const bool err = false)
+    Manager(std::basic_ios<CharT, Traits>& ios, bool const err = false)
       : m_consolebuf(0)
     {
       m_ios = &ios;
       try {
         m_consolebuf = new BasicConsoleBuf<CharT, Traits>(err);
         m_streambuf = m_ios->rdbuf(m_consolebuf);
-      } catch (const std::runtime_error& ex) {
+      } catch (std::runtime_error const& ex) {
         std::cerr << "Failed to create ConsoleBuf!" << std::endl
                   << ex.what() << std::endl;
       };
@@ -72,7 +72,7 @@ public:
     BasicConsoleBuf<CharT, Traits>* m_consolebuf;
   };
 
-  BasicConsoleBuf(const bool err = false)
+  BasicConsoleBuf(bool const err = false)
     : flush_on_newline(true)
     , input_pipe_codepage(0)
     , output_pipe_codepage(0)
@@ -111,7 +111,7 @@ protected:
       success = false;
     }
     if (m_hOutput && !m_obuffer.empty()) {
-      const std::wstring wbuffer = getBuffer(m_obuffer);
+      std::wstring const wbuffer = getBuffer(m_obuffer);
       if (m_isConsoleOutput) {
         DWORD charsWritten;
         success =
@@ -320,17 +320,17 @@ private:
     this->setp((char_type*)m_obuffer.data(),
                (char_type*)m_obuffer.data() + m_obuffer.size());
   }
-  bool encodeOutputBuffer(const std::wstring wbuffer, std::string& buffer)
+  bool encodeOutputBuffer(std::wstring const wbuffer, std::string& buffer)
   {
     if (wbuffer.size() == 0) {
       buffer = std::string();
       return true;
     }
-    const int length =
+    int const length =
       WideCharToMultiByte(m_activeOutputCodepage, 0, wbuffer.c_str(),
                           (int)wbuffer.size(), nullptr, 0, nullptr, nullptr);
     char* buf = new char[length];
-    const bool success =
+    bool const success =
       WideCharToMultiByte(m_activeOutputCodepage, 0, wbuffer.c_str(),
                           (int)wbuffer.size(), buf, length, nullptr,
                           nullptr) > 0
@@ -340,7 +340,7 @@ private:
     delete[] buf;
     return success;
   }
-  bool decodeInputBuffer(const std::string buffer, std::wstring& wbuffer)
+  bool decodeInputBuffer(std::string const buffer, std::wstring& wbuffer)
   {
     size_t length = buffer.length();
     if (length == 0) {
@@ -348,19 +348,19 @@ private:
       return true;
     }
     int actualCodepage = m_activeInputCodepage;
-    const char BOM_UTF8[] = { char(0xEF), char(0xBB), char(0xBF) };
-    const char* data = buffer.data();
-    const size_t BOMsize = sizeof(BOM_UTF8);
+    char const BOM_UTF8[] = { char(0xEF), char(0xBB), char(0xBF) };
+    char const* data = buffer.data();
+    size_t const BOMsize = sizeof(BOM_UTF8);
     if (length >= BOMsize && std::memcmp(data, BOM_UTF8, BOMsize) == 0) {
       // PowerShell uses UTF-8 with BOM for pipes
       actualCodepage = CP_UTF8;
       data += BOMsize;
       length -= BOMsize;
     }
-    const size_t wlength = static_cast<size_t>(MultiByteToWideChar(
+    size_t const wlength = static_cast<size_t>(MultiByteToWideChar(
       actualCodepage, 0, data, static_cast<int>(length), nullptr, 0));
     wchar_t* wbuf = new wchar_t[wlength];
-    const bool success =
+    bool const success =
       MultiByteToWideChar(actualCodepage, 0, data, static_cast<int>(length),
                           wbuf, static_cast<int>(wlength)) > 0
       ? true
@@ -369,19 +369,19 @@ private:
     delete[] wbuf;
     return success;
   }
-  std::wstring getBuffer(const std::basic_string<char> buffer)
+  std::wstring getBuffer(std::basic_string<char> const buffer)
   {
     return Encoding::ToWide(buffer);
   }
-  std::wstring getBuffer(const std::basic_string<wchar_t> buffer)
+  std::wstring getBuffer(std::basic_string<wchar_t> const buffer)
   {
     return buffer;
   }
-  void setBuffer(const std::wstring wbuffer, std::basic_string<char>& target)
+  void setBuffer(std::wstring const wbuffer, std::basic_string<char>& target)
   {
     target = Encoding::ToNarrow(wbuffer);
   }
-  void setBuffer(const std::wstring wbuffer,
+  void setBuffer(std::wstring const wbuffer,
                  std::basic_string<wchar_t>& target)
   {
     target = wbuffer;
diff --git a/Directory.cxx b/Directory.cxx
index 6e4f0a8c3dcb7c746dd71216022a8d983793c4ca..b23c62414caac27fb1c30e48de4d0a95b758dff1 100644
--- a/Directory.cxx
+++ b/Directory.cxx
@@ -92,7 +92,7 @@ unsigned long Directory::GetNumberOfFiles() const
   return static_cast<unsigned long>(this->Internal->Files.size());
 }
 
-const char* Directory::GetFile(unsigned long dindex) const
+char const* Directory::GetFile(unsigned long dindex) const
 {
   return this->Internal->Files[dindex].Name.c_str();
 }
@@ -135,7 +135,7 @@ bool Directory::FileIsSymlink(std::size_t i) const
 #endif
 }
 
-const char* Directory::GetPath() const
+char const* Directory::GetPath() const
 {
   return this->Internal->Path.c_str();
 }
@@ -207,7 +207,7 @@ Status Directory::Load(std::string const& name, std::string* errorMessage)
   return Status::Success();
 }
 
-unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name,
+unsigned long Directory::GetNumberOfFilesInDirectory(std::string const& name,
                                                      std::string* errorMessage)
 {
   HANDLE srchHandle;
@@ -314,7 +314,7 @@ Status Directory::Load(std::string const& name, std::string* errorMessage)
   return Status::Success();
 }
 
-unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name,
+unsigned long Directory::GetNumberOfFilesInDirectory(std::string const& name,
                                                      std::string* errorMessage)
 {
   errno = 0;
diff --git a/Directory.hxx.in b/Directory.hxx.in
index 9d0f4628f291434ee1232c2b6a13fb235c8561ff..c264ffff538e2ab9203c8dc5fe03c89465c6d679 100644
--- a/Directory.hxx.in
+++ b/Directory.hxx.in
@@ -26,10 +26,10 @@ class @KWSYS_NAMESPACE@_EXPORT Directory
 public:
   Directory();
   Directory(Directory&& other);
-  Directory(const Directory&) = delete;
-  Directory& operator=(const Directory&) = delete;
+  Directory(Directory const&) = delete;
+  Directory& operator=(Directory const&) = delete;
   Directory& operator=(Directory&& other);
-  bool operator==(const Directory&) = delete;
+  bool operator==(Directory const&) = delete;
   ~Directory();
 
   /**
@@ -48,12 +48,12 @@ public:
    * A higher performance static method.
    */
   static unsigned long GetNumberOfFilesInDirectory(
-    const std::string&, std::string* errorMessage = nullptr);
+    std::string const&, std::string* errorMessage = nullptr);
 
   /**
    * Return the file at the given index, the indexing is 0 based
    */
-  const char* GetFile(unsigned long) const;
+  char const* GetFile(unsigned long) const;
 
   /**
    * Return the name of the file at the given 0-based index.
@@ -78,7 +78,7 @@ public:
   /**
    * Return the path to Open'ed directory
    */
-  const char* GetPath() const;
+  char const* GetPath() const;
 
   /**
    * Clear the internal structure. Used internally at beginning of Load(...)
diff --git a/DynamicLoader.cxx b/DynamicLoader.cxx
index 8afc2e8e0ba8a5334764340aa61fd4abb0442cce..c39bc0b047e6c547cb275eaa40b3a61f5c79e554 100644
--- a/DynamicLoader.cxx
+++ b/DynamicLoader.cxx
@@ -46,7 +46,7 @@
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname)
+  std::string const& libname)
 {
   return DynamicLoader::OpenLibrary(libname, 0);
 }
@@ -59,7 +59,7 @@ DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   return 0;
 }
@@ -74,12 +74,12 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   return 0;
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   return "General error";
 }
@@ -94,7 +94,7 @@ const char* DynamicLoader::LastError()
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, 0, 0);
 
@@ -110,7 +110,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   void* addr;
   int status;
@@ -127,7 +127,7 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   return *reinterpret_cast<DynamicLoader::SymbolPointer*>(&result);
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   // TODO: Need implementation with errno/strerror
   /* If successful, shl_findsym returns an integer (int) value zero. If
@@ -159,7 +159,7 @@ const char* DynamicLoader::LastError()
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, 0, 0);
 
@@ -190,7 +190,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   void* result = 0;
   // Need to prepend symbols with '_' on Apple-gcc compilers
@@ -205,7 +205,7 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   return *reinterpret_cast<DynamicLoader::SymbolPointer*>(&result);
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   return 0;
 }
@@ -221,7 +221,7 @@ const char* DynamicLoader::LastError()
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, SearchBesideLibrary, nullptr);
 
@@ -240,7 +240,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   // TODO: The calling convention affects the name of the symbol.  We
   // should have a tool to help get the symbol with the desired
@@ -254,14 +254,14 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   // Note that the "@X" part of the name above is the total size (in
   // bytes) of the arguments on the stack.
   void* result;
-  const char* rsym = sym.c_str();
+  char const* rsym = sym.c_str();
   result = (void*)GetProcAddress(lib, rsym);
   return *reinterpret_cast<DynamicLoader::SymbolPointer*>(&result);
 }
 
 #  define DYNLOAD_ERROR_BUFFER_SIZE 1024
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   wchar_t lpMsgBuf[DYNLOAD_ERROR_BUFFER_SIZE + 1];
 
@@ -308,7 +308,7 @@ namespace KWSYS_NAMESPACE {
 static image_id last_dynamic_err = B_OK;
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, 0, 0);
 
@@ -341,7 +341,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   // Hack to cast pointer-to-data to pointer-to-function.
   union
@@ -368,9 +368,9 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   return result.psym;
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
-  const char* retval = strerror(last_dynamic_err);
+  char const* retval = strerror(last_dynamic_err);
   last_dynamic_err = B_OK;
   return retval;
 }
@@ -388,7 +388,7 @@ const char* DynamicLoader::LastError()
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, 0, nullptr);
 
@@ -407,7 +407,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   // Hack to cast pointer-to-data to pointer-to-function.
   union
@@ -419,7 +419,7 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   return result.psym;
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   return dld_strerror(dld_errno);
 }
@@ -434,7 +434,7 @@ const char* DynamicLoader::LastError()
 namespace KWSYS_NAMESPACE {
 
 DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(
-  const std::string& libname, int flags)
+  std::string const& libname, int flags)
 {
   CHECK_OPEN_FLAGS(flags, RTLDGlobal, nullptr);
 
@@ -457,7 +457,7 @@ int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib)
 }
 
 DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
-  DynamicLoader::LibraryHandle lib, const std::string& sym)
+  DynamicLoader::LibraryHandle lib, std::string const& sym)
 {
   // Hack to cast pointer-to-data to pointer-to-function.
   union
@@ -469,7 +469,7 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress(
   return result.psym;
 }
 
-const char* DynamicLoader::LastError()
+char const* DynamicLoader::LastError()
 {
   return dlerror();
 }
diff --git a/DynamicLoader.hxx.in b/DynamicLoader.hxx.in
index 4edd31c6ca065bff272f3712621036ab7ba3fd03..966996e2044a864799899327ee1ae0552635d8aa 100644
--- a/DynamicLoader.hxx.in
+++ b/DynamicLoader.hxx.in
@@ -86,24 +86,24 @@ public:
    * library. The optional second argument is a set of flags to use when
    * opening the library. If unrecognized or unsupported flags are specified,
    * the library is not opened. */
-  static LibraryHandle OpenLibrary(const std::string&);
-  static LibraryHandle OpenLibrary(const std::string&, int);
+  static LibraryHandle OpenLibrary(std::string const&);
+  static LibraryHandle OpenLibrary(std::string const&, int);
 
   /** Attempt to detach a dynamic library from the
    * process.  A value of true is returned if it is successful. */
   static int CloseLibrary(LibraryHandle);
 
   /** Find the address of the symbol in the given library. */
-  static SymbolPointer GetSymbolAddress(LibraryHandle, const std::string&);
+  static SymbolPointer GetSymbolAddress(LibraryHandle, std::string const&);
 
   /** Return the default module prefix for the current platform.  */
-  static const char* LibPrefix() { return "@KWSYS_DynamicLoader_PREFIX@"; }
+  static char const* LibPrefix() { return "@KWSYS_DynamicLoader_PREFIX@"; }
 
   /** Return the default module suffix for the current platform.  */
-  static const char* LibExtension() { return "@KWSYS_DynamicLoader_SUFFIX@"; }
+  static char const* LibExtension() { return "@KWSYS_DynamicLoader_SUFFIX@"; }
 
   /** Return the last error produced from a calls made on this class. */
-  static const char* LastError();
+  static char const* LastError();
 }; // End Class: DynamicLoader
 
 } // namespace @KWSYS_NAMESPACE@
diff --git a/Encoding.h.in b/Encoding.h.in
index 86a26692abc0f29d9ab029f7c787b8f3570646e3..2ce67e5a1ac771ffcb8a748341cd93e50a1c4fd2 100644
--- a/Encoding.h.in
+++ b/Encoding.h.in
@@ -31,22 +31,22 @@ extern "C" {
    On Windows, UTF-8 is assumed, and on other platforms,
    the current locale is assumed.
    */
-kwsysEXPORT size_t kwsysEncoding_mbstowcs(wchar_t* dest, const char* src,
+kwsysEXPORT size_t kwsysEncoding_mbstowcs(wchar_t* dest, char const* src,
                                           size_t n);
 
 /* Convert a narrow string to a wide string.
    This can return NULL if the conversion fails. */
-kwsysEXPORT wchar_t* kwsysEncoding_DupToWide(const char* src);
+kwsysEXPORT wchar_t* kwsysEncoding_DupToWide(char const* src);
 
 /* Convert a wide string to a narrow string.
    On Windows, UTF-8 is assumed, and on other platforms,
    the current locale is assumed. */
-kwsysEXPORT size_t kwsysEncoding_wcstombs(char* dest, const wchar_t* src,
+kwsysEXPORT size_t kwsysEncoding_wcstombs(char* dest, wchar_t const* src,
                                           size_t n);
 
 /* Convert a wide string to a narrow string.
    This can return NULL if the conversion fails. */
-kwsysEXPORT char* kwsysEncoding_DupToNarrow(const wchar_t* str);
+kwsysEXPORT char* kwsysEncoding_DupToNarrow(wchar_t const* str);
 
 #if defined(__cplusplus)
 } /* extern "C" */
diff --git a/Encoding.hxx.in b/Encoding.hxx.in
index 75a2d4d0f996a272ad6a3c6c89651cc7823af2cb..0353db3ed41d892d27adb4cdb8b0c3ca3de28552 100644
--- a/Encoding.hxx.in
+++ b/Encoding.hxx.in
@@ -31,8 +31,8 @@ public:
     // argc and wide argv.  This is useful if wmain() is used.
     CommandLineArguments(int argc, wchar_t const* const* argv);
     ~CommandLineArguments();
-    CommandLineArguments(const CommandLineArguments&);
-    CommandLineArguments& operator=(const CommandLineArguments&);
+    CommandLineArguments(CommandLineArguments const&);
+    CommandLineArguments& operator=(CommandLineArguments const&);
 
     int argc() const;
     char const* const* argv() const;
@@ -50,14 +50,14 @@ public:
   // Convert a narrow string to a wide string.
   // On Windows, UTF-8 is assumed, and on other platforms,
   // the current locale is assumed.
-  static std::wstring ToWide(const std::string& str);
-  static std::wstring ToWide(const char* str);
+  static std::wstring ToWide(std::string const& str);
+  static std::wstring ToWide(char const* str);
 
   // Convert a wide string to a narrow string.
   // On Windows, UTF-8 is assumed, and on other platforms,
   // the current locale is assumed.
-  static std::string ToNarrow(const std::wstring& str);
-  static std::string ToNarrow(const wchar_t* str);
+  static std::string ToNarrow(std::wstring const& str);
+  static std::string ToNarrow(wchar_t const* str);
 
 #  if defined(_WIN32)
   /**
@@ -68,7 +68,7 @@ public:
    * absolute paths with Windows-style backslashes.
    **/
   static std::wstring ToWindowsExtendedPath(std::string const&);
-  static std::wstring ToWindowsExtendedPath(const char* source);
+  static std::wstring ToWindowsExtendedPath(char const* source);
   static std::wstring ToWindowsExtendedPath(std::wstring const& wsource);
 #  endif
 
diff --git a/EncodingC.c b/EncodingC.c
index 13127f1acc6b4e0e9ad28109a2bf2c7a6acb8215..3dbb9c5fec03473e1bf13b1c96a5b9d72b2c60f3 100644
--- a/EncodingC.c
+++ b/EncodingC.c
@@ -15,7 +15,7 @@
 #  include <windows.h>
 #endif
 
-size_t kwsysEncoding_mbstowcs(wchar_t* dest, const char* str, size_t n)
+size_t kwsysEncoding_mbstowcs(wchar_t* dest, char const* str, size_t n)
 {
   if (str == 0) {
     return (size_t)-1;
@@ -29,7 +29,7 @@ size_t kwsysEncoding_mbstowcs(wchar_t* dest, const char* str, size_t n)
 #endif
 }
 
-wchar_t* kwsysEncoding_DupToWide(const char* str)
+wchar_t* kwsysEncoding_DupToWide(char const* str)
 {
   wchar_t* ret = NULL;
   size_t length = kwsysEncoding_mbstowcs(NULL, str, 0) + 1;
@@ -43,7 +43,7 @@ wchar_t* kwsysEncoding_DupToWide(const char* str)
   return ret;
 }
 
-size_t kwsysEncoding_wcstombs(char* dest, const wchar_t* str, size_t n)
+size_t kwsysEncoding_wcstombs(char* dest, wchar_t const* str, size_t n)
 {
   if (str == 0) {
     return (size_t)-1;
@@ -57,7 +57,7 @@ size_t kwsysEncoding_wcstombs(char* dest, const wchar_t* str, size_t n)
 #endif
 }
 
-char* kwsysEncoding_DupToNarrow(const wchar_t* str)
+char* kwsysEncoding_DupToNarrow(wchar_t const* str)
 {
   char* ret = NULL;
   size_t length = kwsysEncoding_wcstombs(NULL, str, 0) + 1;
diff --git a/EncodingCXX.cxx b/EncodingCXX.cxx
index c68c73c8ea8f8aa0cd97343b1241674d7d6842c3..5bdfba30aa641954472dfb9310b56a553b01349d 100644
--- a/EncodingCXX.cxx
+++ b/EncodingCXX.cxx
@@ -86,7 +86,7 @@ Encoding::CommandLineArguments::~CommandLineArguments()
 }
 
 Encoding::CommandLineArguments::CommandLineArguments(
-  const CommandLineArguments& other)
+  CommandLineArguments const& other)
 {
   this->argv_.resize(other.argv_.size());
   for (size_t i = 0; i < this->argv_.size(); i++) {
@@ -95,7 +95,7 @@ Encoding::CommandLineArguments::CommandLineArguments(
 }
 
 Encoding::CommandLineArguments& Encoding::CommandLineArguments::operator=(
-  const CommandLineArguments& other)
+  CommandLineArguments const& other)
 {
   if (this != &other) {
     size_t i;
@@ -124,11 +124,11 @@ char const* const* Encoding::CommandLineArguments::argv() const
 
 #if KWSYS_STL_HAS_WSTRING
 
-std::wstring Encoding::ToWide(const std::string& str)
+std::wstring Encoding::ToWide(std::string const& str)
 {
   std::wstring wstr;
 #  if defined(_WIN32)
-  const int wlength =
+  int const wlength =
     MultiByteToWideChar(KWSYS_ENCODING_DEFAULT_CODEPAGE, 0, str.data(),
                         int(str.size()), nullptr, 0);
   if (wlength > 0) {
@@ -157,7 +157,7 @@ std::wstring Encoding::ToWide(const std::string& str)
   return wstr;
 }
 
-std::string Encoding::ToNarrow(const std::wstring& str)
+std::string Encoding::ToNarrow(std::wstring const& str)
 {
   std::string nstr;
 #  if defined(_WIN32)
@@ -191,7 +191,7 @@ std::string Encoding::ToNarrow(const std::wstring& str)
   return nstr;
 }
 
-std::wstring Encoding::ToWide(const char* cstr)
+std::wstring Encoding::ToWide(char const* cstr)
 {
   std::wstring wstr;
   size_t length = kwsysEncoding_mbstowcs(nullptr, cstr, 0) + 1;
@@ -204,7 +204,7 @@ std::wstring Encoding::ToWide(const char* cstr)
   return wstr;
 }
 
-std::string Encoding::ToNarrow(const wchar_t* wcstr)
+std::string Encoding::ToNarrow(wchar_t const* wcstr)
 {
   std::string str;
   size_t length = kwsysEncoding_wcstombs(nullptr, wcstr, 0) + 1;
@@ -225,7 +225,7 @@ std::wstring Encoding::ToWindowsExtendedPath(std::string const& source)
 }
 
 // Convert local paths to UNC style paths
-std::wstring Encoding::ToWindowsExtendedPath(const char* source)
+std::wstring Encoding::ToWindowsExtendedPath(char const* source)
 {
   return ToWindowsExtendedPath(ToWide(source));
 }
diff --git a/FStream.hxx.in b/FStream.hxx.in
index 55a7fb195a9707bbfb59b3d94b18347854f624bb..d6d6f846ec8d53b91c79c87035c2fafce6022cb6 100644
--- a/FStream.hxx.in
+++ b/FStream.hxx.in
@@ -33,7 +33,7 @@ public:
   typedef std::basic_filebuf<CharType, Traits> my_base_type;
   basic_filebuf* open(char const* s, std::ios_base::openmode mode)
   {
-    const std::wstring wstr = Encoding::ToWindowsExtendedPath(s);
+    std::wstring const wstr = Encoding::ToWindowsExtendedPath(s);
     return static_cast<basic_filebuf*>(my_base_type::open(wstr.c_str(), mode));
   }
 #    endif
@@ -41,7 +41,7 @@ public:
 
 #  else
 
-inline std::wstring getcmode(const std::ios_base::openmode mode)
+inline std::wstring getcmode(std::ios_base::openmode const mode)
 {
   std::wstring cmode;
   bool plus = false;
@@ -91,9 +91,9 @@ public:
       return false;
     }
 #  if defined(_MSC_VER)
-    const bool success = buf_->open(file_name, mode) != 0;
+    bool const success = buf_->open(file_name, mode) != 0;
 #  else
-    const std::wstring wstr = Encoding::ToWindowsExtendedPath(file_name);
+    std::wstring const wstr = Encoding::ToWindowsExtendedPath(file_name);
     bool success = false;
     std::wstring cmode = getcmode(mode);
     file_ = _wfopen(wstr.c_str(), cmode.c_str());
diff --git a/Glob.cxx b/Glob.cxx
index 272ad8500073e422cfe782d04455f71ee2627eb5..e2af4ec36f5ddd7a6f3917026984dd22470fe472 100644
--- a/Glob.cxx
+++ b/Glob.cxx
@@ -70,7 +70,7 @@ std::vector<std::string>& Glob::GetFiles()
   return this->Internals->Files;
 }
 
-std::string Glob::PatternToRegex(const std::string& pattern,
+std::string Glob::PatternToRegex(std::string const& pattern,
                                  bool require_whole_string, bool preserve_case)
 {
   // Incrementally build the regular expression from the pattern.
@@ -179,7 +179,7 @@ std::string Glob::PatternToRegex(const std::string& pattern,
 }
 
 bool Glob::RecurseDirectory(std::string::size_type start,
-                            const std::string& dir, GlobMessages* messages)
+                            std::string const& dir, GlobMessages* messages)
 {
   kwsys::Directory d;
   std::string errorMessage;
@@ -281,7 +281,7 @@ bool Glob::RecurseDirectory(std::string::size_type start,
 }
 
 void Glob::ProcessDirectory(std::string::size_type start,
-                            const std::string& dir, GlobMessages* messages)
+                            std::string const& dir, GlobMessages* messages)
 {
   // std::cout << "ProcessDirectory: " << dir << std::endl;
   bool last = (start == this->Internals->Expressions.size() - 1);
@@ -341,7 +341,7 @@ void Glob::ProcessDirectory(std::string::size_type start,
   }
 }
 
-bool Glob::FindFiles(const std::string& inexpr, GlobMessages* messages)
+bool Glob::FindFiles(std::string const& inexpr, GlobMessages* messages)
 {
   std::string cexpr;
   std::string::size_type cc;
@@ -422,12 +422,12 @@ bool Glob::FindFiles(const std::string& inexpr, GlobMessages* messages)
   return true;
 }
 
-void Glob::AddExpression(const std::string& expr)
+void Glob::AddExpression(std::string const& expr)
 {
   this->Internals->Expressions.emplace_back(this->PatternToRegex(expr));
 }
 
-void Glob::SetRelative(const char* dir)
+void Glob::SetRelative(char const* dir)
 {
   if (!dir) {
     this->Relative = "";
@@ -436,7 +436,7 @@ void Glob::SetRelative(const char* dir)
   this->Relative = dir;
 }
 
-const char* Glob::GetRelative()
+char const* Glob::GetRelative()
 {
   if (this->Relative.empty()) {
     return nullptr;
@@ -444,7 +444,7 @@ const char* Glob::GetRelative()
   return this->Relative.c_str();
 }
 
-void Glob::AddFile(std::vector<std::string>& files, const std::string& file)
+void Glob::AddFile(std::vector<std::string>& files, std::string const& file)
 {
   if (!this->Relative.empty()) {
     files.push_back(kwsys::SystemTools::RelativePath(this->Relative, file));
diff --git a/Glob.hxx.in b/Glob.hxx.in
index fd39775417c62b411c21e98042b40d58586e3d6c..6a33bdabc92d6e95ce09b4633a22abf96a45d517 100644
--- a/Glob.hxx.in
+++ b/Glob.hxx.in
@@ -37,13 +37,13 @@ public:
     MessageType type;
     std::string content;
 
-    Message(MessageType t, const std::string& c)
+    Message(MessageType t, std::string const& c)
       : type(t)
       , content(c)
     {
     }
     ~Message() = default;
-    Message(const Message& msg) = default;
+    Message(Message const& msg) = default;
     Message& operator=(Message const& msg) = default;
   };
 
@@ -54,11 +54,11 @@ public:
   Glob();
   ~Glob();
 
-  Glob(const Glob&) = delete;
-  void operator=(const Glob&) = delete;
+  Glob(Glob const&) = delete;
+  void operator=(Glob const&) = delete;
 
   //! Find all files that match the pattern.
-  bool FindFiles(const std::string& inexpr, GlobMessages* messages = nullptr);
+  bool FindFiles(std::string const& inexpr, GlobMessages* messages = nullptr);
 
   //! Return the list of files that matched.
   std::vector<std::string>& GetFiles();
@@ -80,8 +80,8 @@ public:
   unsigned int GetFollowedSymlinkCount() { return this->FollowedSymlinkCount; }
 
   //! Set relative to true to only show relative path to files.
-  void SetRelative(const char* dir);
-  const char* GetRelative();
+  void SetRelative(char const* dir);
+  char const* GetRelative();
 
   /** Convert the given globbing pattern to a regular expression.
       There is no way to quote meta-characters.  The
@@ -90,7 +90,7 @@ public:
       string.  This is on by default because patterns always match
       whole strings, but may be disabled to support concatenating
       expressions more easily (regex1|regex2|etc).  */
-  static std::string PatternToRegex(const std::string& pattern,
+  static std::string PatternToRegex(std::string const& pattern,
                                     bool require_whole_string = true,
                                     bool preserve_case = false);
 
@@ -105,19 +105,19 @@ public:
 
 protected:
   //! Process directory
-  void ProcessDirectory(std::string::size_type start, const std::string& dir,
+  void ProcessDirectory(std::string::size_type start, std::string const& dir,
                         GlobMessages* messages);
 
   //! Process last directory, but only when recurse flags is on. That is
   // effectively like saying: /path/to/file/**/file
-  bool RecurseDirectory(std::string::size_type start, const std::string& dir,
+  bool RecurseDirectory(std::string::size_type start, std::string const& dir,
                         GlobMessages* messages);
 
   //! Add regular expression
-  void AddExpression(const std::string& expr);
+  void AddExpression(std::string const& expr);
 
   //! Add a file to the list
-  void AddFile(std::vector<std::string>& files, const std::string& file);
+  void AddFile(std::vector<std::string>& files, std::string const& file);
 
   GlobInternals* Internals;
   bool Recurse;
diff --git a/MD5.c b/MD5.c
index b0faa0ebca50ee8f51a66dc4540d462377b67632..d7f196a42f5ac84ba5fbb1b8a1ed1b5f626eca7b 100644
--- a/MD5.c
+++ b/MD5.c
@@ -170,7 +170,7 @@ typedef struct md5_state_s
 #define T63 0x2ad7d2bb
 #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
 
-static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
+static void md5_process(md5_state_t* pms, md5_byte_t const* data /*[64]*/)
 {
   md5_word_t a = pms->abcd[0];
   md5_word_t b = pms->abcd[1];
@@ -183,7 +183,7 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
 #else
   /* Define storage for little-endian or both types of CPUs. */
   md5_word_t xbuf[16];
-  const md5_word_t* X;
+  md5_word_t const* X;
 #endif
 
   {
@@ -193,9 +193,9 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
      * little-endian machine, since we can use a more efficient
      * algorithm on the latter.
      */
-    static const int w = 1;
+    static int const w = 1;
 
-    if (*((const md5_byte_t*)&w)) /* dynamic little-endian */
+    if (*((md5_byte_t const*)&w)) /* dynamic little-endian */
 #endif
 #if BYTE_ORDER <= 0 /* little-endian */
     {
@@ -205,7 +205,7 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
        */
       if (!((uintptr_t)data & 3)) {
         /* data are properly aligned */
-        X = (const md5_word_t*)data;
+        X = (md5_word_t const*)data;
       } else {
         /* not aligned */
         memcpy(xbuf, data, 64);
@@ -222,7 +222,7 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
        * On big-endian machines, we must arrange the bytes in the
        * right order.
        */
-      const md5_byte_t* xp = data;
+      md5_byte_t const* xp = data;
       int i;
 
 #  if BYTE_ORDER == 0
@@ -364,9 +364,9 @@ static void md5_init(md5_state_t* pms)
 }
 
 /* Append a string to the message. */
-static void md5_append(md5_state_t* pms, const md5_byte_t* data, size_t nbytes)
+static void md5_append(md5_state_t* pms, md5_byte_t const* data, size_t nbytes)
 {
-  const md5_byte_t* p = data;
+  md5_byte_t const* p = data;
   size_t left = nbytes;
   size_t offset = (pms->count[0] >> 3) & 63;
   md5_word_t nbits = (md5_word_t)(nbytes << 3);
@@ -409,7 +409,7 @@ static void md5_append(md5_state_t* pms, const md5_byte_t* data, size_t nbytes)
 /* Finish the message and return the digest. */
 static void md5_finish(md5_state_t* pms, md5_byte_t digest[16])
 {
-  static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  static md5_byte_t const pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                       0,    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                       0,    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                       0,    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/Process.h.in b/Process.h.in
index 9f2162b3dce19843b34de01fc3f58df7ff883b21..313554ef1f4f3318cb2f9c0c57cf0103e4de6bfc 100644
--- a/Process.h.in
+++ b/Process.h.in
@@ -145,14 +145,14 @@ kwsysEXPORT void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout);
  * Returns 1 for success and 0 for failure.
  */
 kwsysEXPORT int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp,
-                                                 const char* dir);
+                                                 char const* dir);
 
 /**
  * Set the name of a file to be attached to the given pipe.  Returns 1
  * for success and 0 for failure.
  */
 kwsysEXPORT int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe,
-                                         const char* file);
+                                         char const* file);
 
 /**
  * Set whether the given pipe in the child is shared with the parent
@@ -181,7 +181,7 @@ kwsysEXPORT void kwsysProcess_SetPipeShared(kwsysProcess* cp, int pipe,
  * read end will be closed in the child process.
  */
 kwsysEXPORT void kwsysProcess_SetPipeNative(
-  kwsysProcess* cp, int pipe, const kwsysProcess_Pipe_Handle p[2]);
+  kwsysProcess* cp, int pipe, kwsysProcess_Pipe_Handle const p[2]);
 
 /**
  * Get/Set a possibly platform-specific option.  Possible options are:
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index efe22334f27ba974a7a2667a4895185b5e480914..ce6bb7b9cf165220cfa682afbe9a8aa81e100a15 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -155,7 +155,7 @@ typedef struct kwsysProcessCreateInformation_s
   int ErrorPipe[2];
 } kwsysProcessCreateInformation;
 
-static void kwsysProcessVolatileFree(volatile void* p);
+static void kwsysProcessVolatileFree(void volatile* p);
 static int kwsysProcessInitialize(kwsysProcess* cp);
 static void kwsysProcessCleanup(kwsysProcess* cp, int error);
 static void kwsysProcessCleanupDescriptor(int* pfd);
@@ -164,13 +164,13 @@ static int kwsysProcessSetNonBlocking(int fd);
 static int kwsysProcessCreate(kwsysProcess* cp, int prIndex,
                               kwsysProcessCreateInformation* si);
 static void kwsysProcessDestroy(kwsysProcess* cp);
-static int kwsysProcessSetupOutputPipeFile(int* p, const char* name);
+static int kwsysProcessSetupOutputPipeFile(int* p, char const* name);
 static int kwsysProcessSetupOutputPipeNative(int* p, int des[2]);
 static int kwsysProcessGetTimeoutTime(kwsysProcess* cp,
-                                      const double* userTimeout,
+                                      double const* userTimeout,
                                       kwsysProcessTime* timeoutTime);
 static int kwsysProcessGetTimeoutLeft(kwsysProcessTime* timeoutTime,
-                                      const double* userTimeout,
+                                      double const* userTimeout,
                                       kwsysProcessTimeNative* timeoutLength,
                                       int zeroIsExpired);
 static kwsysProcessTime kwsysProcessTimeGetCurrent(void);
@@ -189,7 +189,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
                               kwsysProcessCreateInformation* si);
 static void kwsysProcessKill(pid_t process_id);
 #if defined(__VMS)
-static int kwsysProcessSetVMSFeature(const char* name, int value);
+static int kwsysProcessSetVMSFeature(char const* name, int value);
 #endif
 static int kwsysProcessesAdd(kwsysProcess* cp);
 static void kwsysProcessesRemove(kwsysProcess* cp);
@@ -225,7 +225,7 @@ struct kwsysProcess_s
 {
   /* The command lines to execute.  */
   char*** Commands;
-  volatile int NumberOfCommands;
+  int volatile NumberOfCommands;
 
   /* Descriptors for the read ends of the child's output pipes and
      the signal pipe. */
@@ -244,7 +244,7 @@ struct kwsysProcess_s
   /* Process IDs returned by the calls to fork.  Everything is volatile
      because the signal handler accesses them.  You must be very careful
      when reaping PIDs or modifying this array to avoid race conditions.  */
-  volatile pid_t* volatile ForkPIDs;
+  pid_t volatile* volatile ForkPIDs;
 
   /* Flag for whether the children were terminated by a failed select.  */
   int SelectError;
@@ -268,7 +268,7 @@ struct kwsysProcess_s
   int MergeOutput;
 
   /* Whether to create the process in a new process group.  */
-  volatile sig_atomic_t CreateProcessGroup;
+  sig_atomic_t volatile CreateProcessGroup;
 
   /* Time at which the child started.  Negative for no timeout.  */
   kwsysProcessTime StartTime;
@@ -292,10 +292,10 @@ struct kwsysProcess_s
 
   /* The status of the process structure.  Must be atomic because
      the signal handler checks this to avoid a race.  */
-  volatile sig_atomic_t State;
+  sig_atomic_t volatile State;
 
   /* Whether the process was killed.  */
-  volatile sig_atomic_t Killed;
+  sig_atomic_t volatile Killed;
 
   /* Buffer for error message in case of failure.  */
   char ErrorMessage[KWSYSPE_PIPE_BUFFER_SIZE + 1];
@@ -495,7 +495,7 @@ void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout)
   cp->TimeoutTime.tv_sec = -1;
 }
 
-int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
+int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, char const* dir)
 {
   if (!cp) {
     return 0;
@@ -519,7 +519,7 @@ int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
   return 1;
 }
 
-int kwsysProcess_SetPipeFile(kwsysProcess* cp, int prPipe, const char* file)
+int kwsysProcess_SetPipeFile(kwsysProcess* cp, int prPipe, char const* file)
 {
   char** pfile;
   if (!cp) {
@@ -586,7 +586,7 @@ void kwsysProcess_SetPipeShared(kwsysProcess* cp, int prPipe, int shared)
   }
 }
 
-void kwsysProcess_SetPipeNative(kwsysProcess* cp, int prPipe, const int p[2])
+void kwsysProcess_SetPipeNative(kwsysProcess* cp, int prPipe, int const p[2])
 {
   int* pPipeNative = 0;
 
@@ -695,7 +695,7 @@ int kwsysProcess_GetExitValue(kwsysProcess* cp)
     : -1;
 }
 
-const char* kwsysProcess_GetErrorString(kwsysProcess* cp)
+char const* kwsysProcess_GetErrorString(kwsysProcess* cp)
 {
   if (!cp) {
     return "Process management structure could not be allocated";
@@ -706,7 +706,7 @@ const char* kwsysProcess_GetErrorString(kwsysProcess* cp)
   return "Success";
 }
 
-const char* kwsysProcess_GetExceptionString(kwsysProcess* cp)
+char const* kwsysProcess_GetExceptionString(kwsysProcess* cp)
 {
   if (!(cp && cp->ProcessResults && (cp->NumberOfCommands > 0))) {
     return "GetExceptionString called with NULL process management structure";
@@ -747,7 +747,7 @@ int kwsysProcess_GetExitCodeByIndex(kwsysProcess* cp, int idx)
   return cp->CommandExitCodes[idx];
 }
 
-const char* kwsysProcess_GetExceptionStringByIndex(kwsysProcess* cp, int idx)
+char const* kwsysProcess_GetExceptionStringByIndex(kwsysProcess* cp, int idx)
 {
   KWSYSPE_IDX_CHK("GetExceptionString called with NULL process management "
                   "structure or index out of bound")
@@ -1260,7 +1260,7 @@ static int kwsysProcessWaitForPipe(kwsysProcess* cp, char** data, int* length,
   /* Poll pipes for data since we do not have select.  */
   for (i = 0; i < KWSYSPE_PIPE_COUNT; ++i) {
     if (cp->PipeReadEnds[i] >= 0) {
-      const int fd = cp->PipeReadEnds[i];
+      int const fd = cp->PipeReadEnds[i];
       int n = read(fd, cp->PipeBuffer, KWSYSPE_PIPE_BUFFER_SIZE);
       if (n > 0) {
         /* We have data on this pipe.  */
@@ -1486,7 +1486,7 @@ void kwsysProcess_Kill(kwsysProcess* cp)
 
 /* Call the free() function with a pointer to volatile without causing
    compiler warnings.  */
-static void kwsysProcessVolatileFree(volatile void* p)
+static void kwsysProcessVolatileFree(void volatile* p)
 {
 /* clang has made it impossible to free memory that points to volatile
    without first using special pragmas to disable a warning...  */
@@ -1504,7 +1504,7 @@ static void kwsysProcessVolatileFree(volatile void* p)
 static int kwsysProcessInitialize(kwsysProcess* cp)
 {
   int i;
-  volatile pid_t* oldForkPIDs;
+  pid_t volatile* oldForkPIDs;
   for (i = 0; i < KWSYSPE_PIPE_COUNT; ++i) {
     cp->PipeReadEnds[i] = -1;
   }
@@ -1528,7 +1528,7 @@ static int kwsysProcessInitialize(kwsysProcess* cp)
   cp->ErrorMessage[0] = 0;
 
   oldForkPIDs = cp->ForkPIDs;
-  cp->ForkPIDs = (volatile pid_t*)malloc(sizeof(volatile pid_t) *
+  cp->ForkPIDs = (pid_t volatile*)malloc(sizeof(pid_t volatile) *
                                          (size_t)(cp->NumberOfCommands));
   kwsysProcessVolatileFree(oldForkPIDs);
   if (!cp->ForkPIDs) {
@@ -1935,7 +1935,7 @@ static void kwsysProcessDestroy(kwsysProcess* cp)
   sigprocmask(SIG_SETMASK, &old_mask, 0);
 }
 
-static int kwsysProcessSetupOutputPipeFile(int* p, const char* name)
+static int kwsysProcessSetupOutputPipeFile(int* p, char const* name)
 {
   int fout;
   if (!name) {
@@ -1982,7 +1982,7 @@ static int kwsysProcessSetupOutputPipeNative(int* p, int des[2])
 /* Get the time at which either the process or user timeout will
    expire.  Returns 1 if the user timeout is first, and 0 otherwise.  */
 static int kwsysProcessGetTimeoutTime(kwsysProcess* cp,
-                                      const double* userTimeout,
+                                      double const* userTimeout,
                                       kwsysProcessTime* timeoutTime)
 {
   /* The first time this is called, we need to calculate the time at
@@ -2022,7 +2022,7 @@ static int kwsysProcessGetTimeoutTime(kwsysProcess* cp,
 /* Get the length of time before the given timeout time arrives.
    Returns 1 if the time has already arrived, and 0 otherwise.  */
 static int kwsysProcessGetTimeoutLeft(kwsysProcessTime* timeoutTime,
-                                      const double* userTimeout,
+                                      double const* userTimeout,
                                       kwsysProcessTimeNative* timeoutLength,
                                       int zeroIsExpired)
 {
@@ -2572,7 +2572,7 @@ static void kwsysProcessKill(pid_t process_id)
             fclose(f);
             buffer[nread] = '\0';
             if (nread > 0) {
-              const char* rparen = strrchr(buffer, ')');
+              char const* rparen = strrchr(buffer, ')');
               int ppid;
               if (rparen && (sscanf(rparen + 1, "%*s %d", &ppid) == 1)) {
                 if (ppid == process_id) {
@@ -2628,9 +2628,9 @@ static void kwsysProcessKill(pid_t process_id)
 }
 
 #if defined(__VMS)
-int decc$feature_get_index(const char* name);
+int decc$feature_get_index(char const* name);
 int decc$feature_set_value(int index, int mode, int value);
-static int kwsysProcessSetVMSFeature(const char* name, int value)
+static int kwsysProcessSetVMSFeature(char const* name, int value)
 {
   int i;
   errno = 0;
diff --git a/ProcessWin32.c b/ProcessWin32.c
index c1a566f4ad1058a8cf3c34a6a4fccc0efb632656..39357f6359ac06f7350766c1a46b50c477654cab 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -89,7 +89,7 @@ static int kwsysProcessInitialize(kwsysProcess* cp);
 static DWORD kwsysProcessCreate(kwsysProcess* cp, int index,
                                 kwsysProcessCreateInformation* si);
 static void kwsysProcessDestroy(kwsysProcess* cp, int event);
-static DWORD kwsysProcessSetupOutputPipeFile(PHANDLE handle, const char* name);
+static DWORD kwsysProcessSetupOutputPipeFile(PHANDLE handle, char const* name);
 static void kwsysProcessSetupSharedPipe(DWORD nStdHandle, PHANDLE handle);
 static void kwsysProcessSetupPipeNative(HANDLE native, PHANDLE handle);
 static void kwsysProcessCleanupHandle(PHANDLE h);
@@ -654,7 +654,7 @@ void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout)
   cp->TimeoutTime.QuadPart = -1;
 }
 
-int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
+int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, char const* dir)
 {
   if (!cp) {
     return 0;
@@ -685,7 +685,7 @@ int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
   return 1;
 }
 
-int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, const char* file)
+int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, char const* file)
 {
   char** pfile;
   if (!cp) {
@@ -867,7 +867,7 @@ int kwsysProcess_GetExitCode(kwsysProcess* cp)
     : 0;
 }
 
-const char* kwsysProcess_GetErrorString(kwsysProcess* cp)
+char const* kwsysProcess_GetErrorString(kwsysProcess* cp)
 {
   if (!cp) {
     return "Process management structure could not be allocated";
@@ -877,7 +877,7 @@ const char* kwsysProcess_GetErrorString(kwsysProcess* cp)
   return "Success";
 }
 
-const char* kwsysProcess_GetExceptionString(kwsysProcess* cp)
+char const* kwsysProcess_GetExceptionString(kwsysProcess* cp)
 {
   if (!(cp && cp->ProcessResults && (cp->NumberOfCommands > 0))) {
     return "GetExceptionString called with NULL process management structure";
@@ -918,7 +918,7 @@ int kwsysProcess_GetExitCodeByIndex(kwsysProcess* cp, int idx)
   return cp->CommandExitCodes[idx];
 }
 
-const char* kwsysProcess_GetExceptionStringByIndex(kwsysProcess* cp, int idx)
+char const* kwsysProcess_GetExceptionStringByIndex(kwsysProcess* cp, int idx)
 {
   KWSYSPE_IDX_CHK("GetExceptionString called with NULL process management "
                   "structure or index out of bound")
@@ -1796,7 +1796,7 @@ void kwsysProcessDestroy(kwsysProcess* cp, int event)
   }
 }
 
-DWORD kwsysProcessSetupOutputPipeFile(PHANDLE phandle, const char* name)
+DWORD kwsysProcessSetupOutputPipeFile(PHANDLE phandle, char const* name)
 {
   HANDLE fout;
   wchar_t* wname;
diff --git a/RegularExpression.cxx b/RegularExpression.cxx
index 75e7442c28c4c7427b452a2b5ee102e27014116d..e6e16e52ea04adbf68580cf0a6d844d946c9f790 100644
--- a/RegularExpression.cxx
+++ b/RegularExpression.cxx
@@ -34,7 +34,7 @@
 namespace KWSYS_NAMESPACE {
 
 // RegularExpression -- Copies the given regular expression.
-RegularExpression::RegularExpression(const RegularExpression& rxp)
+RegularExpression::RegularExpression(RegularExpression const& rxp)
 {
   if (!rxp.program) {
     this->program = nullptr;
@@ -63,7 +63,7 @@ RegularExpression::RegularExpression(const RegularExpression& rxp)
 }
 
 // operator= -- Copies the given regular expression.
-RegularExpression& RegularExpression::operator=(const RegularExpression& rxp)
+RegularExpression& RegularExpression::operator=(RegularExpression const& rxp)
 {
   if (this == &rxp) {
     return *this;
@@ -99,7 +99,7 @@ RegularExpression& RegularExpression::operator=(const RegularExpression& rxp)
 
 // operator== -- Returns true if two regular expressions have the same
 // compiled program for pattern matching.
-bool RegularExpression::operator==(const RegularExpression& rxp) const
+bool RegularExpression::operator==(RegularExpression const& rxp) const
 {
   if (this != &rxp) {         // Same address?
     int ind = this->progsize; // Get regular expression size
@@ -115,7 +115,7 @@ bool RegularExpression::operator==(const RegularExpression& rxp) const
 // deep_equal -- Returns true if have the same compiled regular expressions
 // and the same start and end pointers.
 
-bool RegularExpression::deep_equal(const RegularExpression& rxp) const
+bool RegularExpression::deep_equal(RegularExpression const& rxp) const
 {
   int ind = this->progsize;                     // Get regular expression size
   if (ind != rxp.progsize)                      // If different size regexp
@@ -257,7 +257,7 @@ bool RegularExpression::deep_equal(const RegularExpression& rxp) const
 #define NEXT(p) (((*((p) + 1) & 0377) << 8) + (*((p) + 2) & 0377))
 #define OPERAND(p) ((p) + 3)
 
-const unsigned char MAGIC = 0234;
+unsigned char const MAGIC = 0234;
 /*
  * Utility definitions.
  */
@@ -293,7 +293,7 @@ static char* const regdummyptr = &regdummy;
 class RegExpCompile
 {
 public:
-  const char* regparse; // Input-scan pointer.
+  char const* regparse; // Input-scan pointer.
   int regnpar;          // () count.
   char* regcode;        // Code-emit pointer; regdummyptr = don't.
   long regsize;         // Code size.
@@ -305,11 +305,11 @@ public:
   char* regnode(char);
   void regc(char);
   void reginsert(char, char*);
-  static void regtail(char*, const char*);
-  static void regoptail(char*, const char*);
+  static void regtail(char*, char const*);
+  static void regoptail(char*, char const*);
 };
 
-static const char* regnext(const char*);
+static char const* regnext(char const*);
 static char* regnext(char*);
 
 #ifdef STRCSPN
@@ -333,10 +333,10 @@ static int strcspn();
 // compile -- compile a regular expression into internal code
 // for later pattern matching.
 
-bool RegularExpression::compile(const char* exp)
+bool RegularExpression::compile(char const* exp)
 {
-  const char* scan;
-  const char* longest;
+  char const* scan;
+  char const* longest;
   int flags;
 
   if (!exp) {
@@ -799,7 +799,7 @@ void RegExpCompile::reginsert(char op, char* opnd)
 /*
  - regtail - set the next-pointer at the end of a node chain
  */
-void RegExpCompile::regtail(char* p, const char* val)
+void RegExpCompile::regtail(char* p, char const* val)
 {
   char* scan;
   char* temp;
@@ -828,7 +828,7 @@ void RegExpCompile::regtail(char* p, const char* val)
 /*
  - regoptail - regtail on operand of first argument; nop if operandless
  */
-void RegExpCompile::regoptail(char* p, const char* val)
+void RegExpCompile::regoptail(char* p, char const* val)
 {
   // "Operandless" and "op != BRANCH" are synonymous in practice.
   if (!p || p == regdummyptr || OP(p) != BRANCH)
@@ -848,14 +848,14 @@ void RegExpCompile::regoptail(char* p, const char* val)
 class RegExpFind
 {
 public:
-  const char* reginput;   // String-input pointer.
-  const char* regbol;     // Beginning of input, for ^ check.
-  const char** regstartp; // Pointer to startp array.
-  const char** regendp;   // Ditto for endp.
-
-  int regtry(const char*, const char**, const char**, const char*);
-  int regmatch(const char*);
-  int regrepeat(const char*);
+  char const* reginput;   // String-input pointer.
+  char const* regbol;     // Beginning of input, for ^ check.
+  char const** regstartp; // Pointer to startp array.
+  char const** regendp;   // Ditto for endp.
+
+  int regtry(char const*, char const**, char const**, char const*);
+  int regmatch(char const*);
+  int regrepeat(char const*);
 };
 
 // find -- Matches the regular expression to the given string.
@@ -863,7 +863,7 @@ public:
 bool RegularExpression::find(char const* string,
                              RegularExpressionMatch& rmatch) const
 {
-  const char* s;
+  char const* s;
 
   rmatch.clear();
   rmatch.searchstring = string;
@@ -926,12 +926,12 @@ bool RegularExpression::find(char const* string,
  - regtry - try match at specific point
    0 failure, 1 success
  */
-int RegExpFind::regtry(const char* string, const char** start,
-                       const char** end, const char* prog)
+int RegExpFind::regtry(char const* string, char const** start,
+                       char const** end, char const* prog)
 {
   int i;
-  const char** sp1;
-  const char** ep;
+  char const** sp1;
+  char const** ep;
 
   reginput = string;
   regstartp = start;
@@ -962,10 +962,10 @@ int RegExpFind::regtry(const char* string, const char** start,
  * by recursion.
  * 0 failure, 1 success
  */
-int RegExpFind::regmatch(const char* prog)
+int RegExpFind::regmatch(char const* prog)
 {
-  const char* scan; // Current node.
-  const char* next; // Next node.
+  char const* scan; // Current node.
+  char const* next; // Next node.
 
   scan = prog;
 
@@ -989,7 +989,7 @@ int RegExpFind::regmatch(const char* prog)
         break;
       case EXACTLY: {
         size_t len;
-        const char* opnd;
+        char const* opnd;
 
         opnd = OPERAND(scan);
         // Inline the first character, for speed.
@@ -1047,7 +1047,7 @@ int RegExpFind::regmatch(const char* prog)
       case OPEN + 31:
       case OPEN + 32: {
         int no;
-        const char* save;
+        char const* save;
 
         no = OP(scan) - OPEN;
         save = reginput;
@@ -1098,7 +1098,7 @@ int RegExpFind::regmatch(const char* prog)
       case CLOSE + 31:
       case CLOSE + 32: {
         int no;
-        const char* save;
+        char const* save;
 
         no = OP(scan) - CLOSE;
         save = reginput;
@@ -1118,7 +1118,7 @@ int RegExpFind::regmatch(const char* prog)
       //              break;
       case BRANCH: {
 
-        const char* save;
+        char const* save;
 
         if (OP(next) != BRANCH) // No choice.
           next = OPERAND(scan); // Avoid recursion.
@@ -1138,7 +1138,7 @@ int RegExpFind::regmatch(const char* prog)
       case PLUS: {
         char nextch;
         int no;
-        const char* save;
+        char const* save;
         int min_no;
 
         //
@@ -1187,11 +1187,11 @@ int RegExpFind::regmatch(const char* prog)
 /*
  - regrepeat - repeatedly match something simple, report how many
  */
-int RegExpFind::regrepeat(const char* p)
+int RegExpFind::regrepeat(char const* p)
 {
   int count = 0;
-  const char* scan;
-  const char* opnd;
+  char const* scan;
+  char const* opnd;
 
   scan = reginput;
   opnd = OPERAND(p);
@@ -1230,7 +1230,7 @@ int RegExpFind::regrepeat(const char* p)
 /*
  - regnext - dig the "next" pointer out of a node
  */
-static const char* regnext(const char* p)
+static char const* regnext(char const* p)
 {
   int offset;
 
diff --git a/RegularExpression.hxx.in b/RegularExpression.hxx.in
index d73482b04282d76f74d915e8e870a50bf0cca395..b9eef354133c040d8ef97b8a426aece3987f8a8d 100644
--- a/RegularExpression.hxx.in
+++ b/RegularExpression.hxx.in
@@ -55,9 +55,9 @@ public:
 
 private:
   friend class RegularExpression;
-  const char* startp[NSUBEXP];
-  const char* endp[NSUBEXP];
-  const char* searchstring;
+  char const* startp[NSUBEXP];
+  char const* endp[NSUBEXP];
+  char const* searchstring;
 };
 
 #ifdef _MSC_VER
@@ -369,7 +369,7 @@ public:
   /**
    * Copy the given regular expression.
    */
-  RegularExpression& operator=(const RegularExpression& rxp);
+  RegularExpression& operator=(RegularExpression const& rxp);
 
   /**
    * Returns true if two regular expressions have the same
@@ -403,7 +403,7 @@ private:
   RegularExpressionMatch regmatch;
   char regstart;                  // Internal use only
   char reganch;                   // Internal use only
-  const char* regmust;            // Internal use only
+  char const* regmust;            // Internal use only
   std::string::size_type regmlen; // Internal use only
   char* program;
   int progsize;
@@ -425,7 +425,7 @@ inline RegularExpression::RegularExpression()
  * Creates a regular expression from string s, and
  * compiles s.
  */
-inline RegularExpression::RegularExpression(const char* s)
+inline RegularExpression::RegularExpression(char const* s)
   : regstart{}
   , reganch{}
   , regmust{}
@@ -441,7 +441,7 @@ inline RegularExpression::RegularExpression(const char* s)
  * Creates a regular expression from string s, and
  * compiles s.
  */
-inline RegularExpression::RegularExpression(const std::string& s)
+inline RegularExpression::RegularExpression(std::string const& s)
   : regstart{}
   , reganch{}
   , regmust{}
@@ -474,7 +474,7 @@ inline bool RegularExpression::compile(std::string const& s)
  * Matches the regular expression to the given std string.
  * Returns true if found, and sets start and end indexes accordingly.
  */
-inline bool RegularExpression::find(const char* s)
+inline bool RegularExpression::find(char const* s)
 {
   return this->find(s, this->regmatch);
 }
@@ -540,7 +540,7 @@ inline std::string RegularExpression::match(int n) const
  * Returns true if two regular expressions have different
  * compiled program for pattern matching.
  */
-inline bool RegularExpression::operator!=(const RegularExpression& r) const
+inline bool RegularExpression::operator!=(RegularExpression const& r) const
 {
   return (!(*this == r));
 }
diff --git a/String.c b/String.c
index daf7ad1a0f5ce168fa9653413932e76371c20618..7fd159b461f9c52305da651ccf1ef6d0d05693b3 100644
--- a/String.c
+++ b/String.c
@@ -61,14 +61,14 @@ static char kwsysString_strcasecmp_tolower[] = {
 #  endif
 
 /*--------------------------------------------------------------------------*/
-int kwsysString_strcasecmp(const char* lhs, const char* rhs)
+int kwsysString_strcasecmp(char const* lhs, char const* rhs)
 {
 #  if defined(KWSYS_STRING_USE_STRICMP)
   return _stricmp(lhs, rhs);
 #  elif defined(KWSYS_STRING_USE_STRCASECMP)
   return strcasecmp(lhs, rhs);
 #  else
-  const char* const lower = kwsysString_strcasecmp_tolower;
+  char const* const lower = kwsysString_strcasecmp_tolower;
   unsigned char const* us1 = (unsigned char const*)lhs;
   unsigned char const* us2 = (unsigned char const*)rhs;
   int result;
@@ -79,14 +79,14 @@ int kwsysString_strcasecmp(const char* lhs, const char* rhs)
 }
 
 /*--------------------------------------------------------------------------*/
-int kwsysString_strncasecmp(const char* lhs, const char* rhs, size_t n)
+int kwsysString_strncasecmp(char const* lhs, char const* rhs, size_t n)
 {
 #  if defined(KWSYS_STRING_USE_STRICMP)
   return _strnicmp(lhs, rhs, n);
 #  elif defined(KWSYS_STRING_USE_STRCASECMP)
   return strncasecmp(lhs, rhs, n);
 #  else
-  const char* const lower = kwsysString_strcasecmp_tolower;
+  char const* const lower = kwsysString_strcasecmp_tolower;
   unsigned char const* us1 = (unsigned char const*)lhs;
   unsigned char const* us2 = (unsigned char const*)rhs;
   int result = 0;
diff --git a/String.h.in b/String.h.in
index 7c9348af1344de76c71edb5d6ea998164b45378e..6931051e38aa697bc985af66a009fac8b22d81cf 100644
--- a/String.h.in
+++ b/String.h.in
@@ -30,13 +30,13 @@ extern "C" {
  * is found to be less than, equal to, or greater than the second
  * string, respectively.
  */
-kwsysEXPORT int kwsysString_strcasecmp(const char* lhs, const char* rhs);
+kwsysEXPORT int kwsysString_strcasecmp(char const* lhs, char const* rhs);
 
 /**
  * Identical to String_strcasecmp except that only the first n
  * characters are considered.
  */
-kwsysEXPORT int kwsysString_strncasecmp(const char* lhs, const char* rhs,
+kwsysEXPORT int kwsysString_strncasecmp(char const* lhs, char const* rhs,
                                         size_t n);
 
 #if defined(__cplusplus)
diff --git a/System.c b/System.c
index dbfd2fd169f6a15f296c593e23eabf89c53a7192..11257cdb3441e7856019dbd05e1e935552a7f937 100644
--- a/System.c
+++ b/System.c
@@ -22,7 +22,7 @@ typedef ptrdiff_t kwsysSystem_ptrdiff_t;
 typedef int kwsysSystem_ptrdiff_t;
 #endif
 
-static int kwsysSystem__AppendByte(const char* local, char** begin, char** end,
+static int kwsysSystem__AppendByte(char const* local, char** begin, char** end,
                                    int* size, char c)
 {
   /* Allocate space for the character.  */
@@ -91,7 +91,7 @@ static int kwsysSystem__AppendArgument(char** local, char*** begin,
 
 #define KWSYSPE_LOCAL_BYTE_COUNT 1024
 #define KWSYSPE_LOCAL_ARGS_COUNT 32
-static char** kwsysSystem__ParseUnixCommand(const char* command, int flags)
+static char** kwsysSystem__ParseUnixCommand(char const* command, int flags)
 {
   /* Create a buffer for argument pointers during parsing.  */
   char* local_pointers[KWSYSPE_LOCAL_ARGS_COUNT];
@@ -107,7 +107,7 @@ static char** kwsysSystem__ParseUnixCommand(const char* command, int flags)
 
   /* Parse the command string.  Try to behave like a UNIX shell.  */
   char** newCommand = 0;
-  const char* c = command;
+  char const* c = command;
   int in_argument = 0;
   int in_escape = 0;
   int in_single = 0;
@@ -224,7 +224,7 @@ static char** kwsysSystem__ParseUnixCommand(const char* command, int flags)
   return newCommand;
 }
 
-char** kwsysSystem_Parse_CommandForUnix(const char* command, int flags)
+char** kwsysSystem_Parse_CommandForUnix(char const* command, int flags)
 {
   /* Validate the flags.  */
   if (flags != 0) {
diff --git a/System.h.in b/System.h.in
index a9d4f5e690b07b7e8370897b14a645735e74ef1e..21b196493ac4470bae7893c102a2dab12df4d42e 100644
--- a/System.h.in
+++ b/System.h.in
@@ -40,7 +40,7 @@ extern "C" {
  * any character may be escaped by a backslash.  The flags argument is
  * reserved for future use, and must be zero (or the call will fail).
  */
-kwsysEXPORT char** kwsysSystem_Parse_CommandForUnix(const char* command,
+kwsysEXPORT char** kwsysSystem_Parse_CommandForUnix(char const* command,
                                                     int flags);
 
 #if defined(__cplusplus)
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 9b1a85bfda7d24ae1652e8a8b06e65505d776f91..9ac30bc7c7649da2bb233cd8f2af781ea96a8353 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -272,15 +272,15 @@ public:
   SystemInformationImplementation();
   ~SystemInformationImplementation() = default;
 
-  const char* GetVendorString() const;
-  const char* GetVendorID();
+  char const* GetVendorString() const;
+  char const* GetVendorID();
   std::string GetTypeID() const;
   std::string GetFamilyID() const;
   std::string GetModelID() const;
   std::string GetModelName() const;
   std::string GetSteppingCode() const;
-  const char* GetExtendedProcessorName() const;
-  const char* GetProcessorSerialNumber() const;
+  char const* GetExtendedProcessorName() const;
+  char const* GetProcessorSerialNumber() const;
   int GetProcessorCacheSize() const;
   unsigned int GetLogicalProcessorsPerPhysical() const;
   float GetProcessorClockFrequency() const;
@@ -288,12 +288,12 @@ public:
   int GetProcessorCacheXSize(long int) const;
   bool DoesCPUSupportFeature(long int) const;
 
-  const char* GetOSName();
-  const char* GetHostname();
+  char const* GetOSName();
+  char const* GetHostname();
   int GetFullyQualifiedDomainName(std::string& fqdn);
-  const char* GetOSRelease();
-  const char* GetOSVersion();
-  const char* GetOSPlatform();
+  char const* GetOSRelease();
+  char const* GetOSVersion();
+  char const* GetOSPlatform();
 
   bool Is64Bits() const;
 
@@ -312,11 +312,11 @@ public:
 
   // Retrieve memory information in KiB.
   long long GetHostMemoryTotal();
-  long long GetHostMemoryAvailable(const char* hostLimitEnvVarName);
+  long long GetHostMemoryAvailable(char const* hostLimitEnvVarName);
   long long GetHostMemoryUsed();
 
-  long long GetProcMemoryAvailable(const char* hostLimitEnvVarName,
-                                   const char* procLimitEnvVarName);
+  long long GetProcMemoryAvailable(char const* hostLimitEnvVarName,
+                                   char const* procLimitEnvVarName);
   long long GetProcMemoryUsed();
 
   double GetLoadAverage();
@@ -440,7 +440,7 @@ protected:
 
   // For Linux and Cygwin, /proc/cpuinfo formats are slightly different
   bool RetrieveInformationFromCpuInfoFile();
-  std::string ExtractValueFromCpuInfoFile(std::string buffer, const char* word,
+  std::string ExtractValueFromCpuInfoFile(std::string buffer, char const* word,
                                           size_t init = 0);
 
   bool QueryLinuxMemory();
@@ -449,20 +449,20 @@ protected:
   static void Delay(unsigned int);
   static void DelayOverhead(unsigned int);
 
-  void FindManufacturer(const std::string& family = "");
+  void FindManufacturer(std::string const& family = "");
 
   // For Mac
   bool ParseSysCtl();
-  int CallSwVers(const char* arg, std::string& ver);
+  int CallSwVers(char const* arg, std::string& ver);
   void TrimNewline(std::string&);
-  std::string ExtractValueFromSysCtl(const char* word);
+  std::string ExtractValueFromSysCtl(char const* word);
   std::string SysCtlBuffer;
 
   // For Solaris
   bool QuerySolarisMemory();
   bool QuerySolarisProcessor();
-  std::string ParseValueFromKStat(const char* arguments);
-  std::string RunProcess(std::vector<const char*> args);
+  std::string ParseValueFromKStat(char const* arguments);
+  std::string RunProcess(std::vector<char const*> args);
 
   // For Haiku OS
   bool QueryHaikuInfo();
@@ -518,12 +518,12 @@ SystemInformation::~SystemInformation()
   delete this->Implementation;
 }
 
-const char* SystemInformation::GetVendorString()
+char const* SystemInformation::GetVendorString()
 {
   return this->Implementation->GetVendorString();
 }
 
-const char* SystemInformation::GetVendorID()
+char const* SystemInformation::GetVendorID()
 {
   return this->Implementation->GetVendorID();
 }
@@ -553,12 +553,12 @@ std::string SystemInformation::GetSteppingCode()
   return this->Implementation->GetSteppingCode();
 }
 
-const char* SystemInformation::GetExtendedProcessorName()
+char const* SystemInformation::GetExtendedProcessorName()
 {
   return this->Implementation->GetExtendedProcessorName();
 }
 
-const char* SystemInformation::GetProcessorSerialNumber()
+char const* SystemInformation::GetProcessorSerialNumber()
 {
   return this->Implementation->GetProcessorSerialNumber();
 }
@@ -614,12 +614,12 @@ std::string SystemInformation::GetCPUDescription()
   return tmp;
 }
 
-const char* SystemInformation::GetOSName()
+char const* SystemInformation::GetOSName()
 {
   return this->Implementation->GetOSName();
 }
 
-const char* SystemInformation::GetHostname()
+char const* SystemInformation::GetHostname()
 {
   return this->Implementation->GetHostname();
 }
@@ -631,17 +631,17 @@ std::string SystemInformation::GetFullyQualifiedDomainName()
   return fqdn;
 }
 
-const char* SystemInformation::GetOSRelease()
+char const* SystemInformation::GetOSRelease()
 {
   return this->Implementation->GetOSRelease();
 }
 
-const char* SystemInformation::GetOSVersion()
+char const* SystemInformation::GetOSVersion()
 {
   return this->Implementation->GetOSVersion();
 }
 
-const char* SystemInformation::GetOSPlatform()
+char const* SystemInformation::GetOSPlatform()
 {
   return this->Implementation->GetOSPlatform();
 }
@@ -724,7 +724,7 @@ size_t SystemInformation::GetAvailablePhysicalMemory()
 }
 
 std::string SystemInformation::GetMemoryDescription(
-  const char* hostLimitEnvVarName, const char* procLimitEnvVarName)
+  char const* hostLimitEnvVarName, char const* procLimitEnvVarName)
 {
   std::ostringstream oss;
   oss << "Host Total: " << this->GetHostMemoryTotal()
@@ -743,7 +743,7 @@ long long SystemInformation::GetHostMemoryTotal()
 }
 
 long long SystemInformation::GetHostMemoryAvailable(
-  const char* hostLimitEnvVarName)
+  char const* hostLimitEnvVarName)
 {
   return this->Implementation->GetHostMemoryAvailable(hostLimitEnvVarName);
 }
@@ -755,7 +755,7 @@ long long SystemInformation::GetHostMemoryUsed()
 
 // process memory info in units of KiB.
 long long SystemInformation::GetProcMemoryAvailable(
-  const char* hostLimitEnvVarName, const char* procLimitEnvVarName)
+  char const* hostLimitEnvVarName, char const* procLimitEnvVarName)
 {
   return this->Implementation->GetProcMemoryAvailable(hostLimitEnvVarName,
                                                       procLimitEnvVarName);
@@ -827,7 +827,7 @@ int LoadLines(FILE* file, std::vector<std::string>& lines)
 {
   // Load each line in the given file into a the vector.
   int nRead = 0;
-  const int bufSize = 1024;
+  int const bufSize = 1024;
   char buf[bufSize] = { '\0' };
   while (!feof(file) && !ferror(file)) {
     errno = 0;
@@ -854,7 +854,7 @@ int LoadLines(FILE* file, std::vector<std::string>& lines)
 
 #  if defined(__linux) || defined(__CYGWIN__)
 // *****************************************************************************
-int LoadLines(const char* fileName, std::vector<std::string>& lines)
+int LoadLines(char const* fileName, std::vector<std::string>& lines)
 {
   FILE* file = fopen(fileName, "r");
   if (!file) {
@@ -888,7 +888,7 @@ int NameValue(std::vector<std::string> const& lines, std::string const& name,
 #if defined(__linux) || defined(__CYGWIN__)
 // ****************************************************************************
 template <typename T>
-int GetFieldsFromFile(const char* fileName, const char** fieldNames, T* values)
+int GetFieldsFromFile(char const* fileName, char const** fieldNames, T* values)
 {
   std::vector<std::string> fields;
   if (!LoadLines(fileName, fields)) {
@@ -907,9 +907,9 @@ int GetFieldsFromFile(const char* fileName, const char** fieldNames, T* values)
 
 // ****************************************************************************
 template <typename T>
-int GetFieldFromFile(const char* fileName, const char* fieldName, T& value)
+int GetFieldFromFile(char const* fileName, char const* fieldName, T& value)
 {
-  const char* fieldNames[2] = { fieldName, nullptr };
+  char const* fieldNames[2] = { fieldName, nullptr };
   T values[1] = { T(0) };
   int ierr = GetFieldsFromFile(fileName, fieldNames, values);
   if (ierr) {
@@ -923,7 +923,7 @@ int GetFieldFromFile(const char* fileName, const char* fieldName, T& value)
 // ****************************************************************************
 #if defined(__APPLE__)
 template <typename T>
-int GetFieldsFromCommand(const char* command, const char** fieldNames,
+int GetFieldsFromCommand(char const* command, char const** fieldNames,
                          T* values)
 {
   FILE* file = popen(command, "r");
@@ -1181,14 +1181,14 @@ public:
   // Description:
   // Set/Get the name of the binary file that the symbol
   // is found in.
-  void SetBinary(const char* binary) { this->Binary = safes(binary); }
+  void SetBinary(char const* binary) { this->Binary = safes(binary); }
 
   std::string GetBinary() const;
 
   // Description:
   // Set the name of the function that the symbol is found in.
   // If c++ demangling is supported it will be demangled.
-  void SetFunction(const char* function)
+  void SetFunction(char const* function)
   {
     this->Function = this->Demangle(function);
   }
@@ -1198,7 +1198,7 @@ public:
   // Description:
   // Set/Get the name of the source file where the symbol
   // is defined.
-  void SetSourceFile(const char* sourcefile)
+  void SetSourceFile(char const* sourcefile)
   {
     this->SourceFile = safes(sourcefile);
   }
@@ -1228,8 +1228,8 @@ private:
                                static_cast<char*>(this->BinaryBaseAddress));
   }
 
-  std::string GetFileName(const std::string& path) const;
-  std::string Demangle(const char* symbol) const;
+  std::string GetFileName(std::string const& path) const;
+  std::string Demangle(char const* symbol) const;
 
 private:
   std::string Binary;
@@ -1241,7 +1241,7 @@ private:
   int ReportPath;
 };
 
-std::ostream& operator<<(std::ostream& os, const SymbolProperties& sp)
+std::ostream& operator<<(std::ostream& os, SymbolProperties const& sp)
 {
 #  if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
   os << std::hex << sp.GetAddress() << " : " << sp.GetFunction() << " [("
@@ -1277,7 +1277,7 @@ SymbolProperties::SymbolProperties()
   this->GetLineNumber();
 }
 
-std::string SymbolProperties::GetFileName(const std::string& path) const
+std::string SymbolProperties::GetFileName(std::string const& path) const
 {
   std::string file(path);
   if (!this->ReportPath) {
@@ -1309,7 +1309,7 @@ std::string SymbolProperties::GetBinary() const
   return this->GetFileName(this->Binary);
 }
 
-std::string SymbolProperties::Demangle(const char* symbol) const
+std::string SymbolProperties::Demangle(char const* symbol) const
 {
   std::string result = safes(symbol);
 #  if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
@@ -1517,19 +1517,19 @@ void SystemInformationImplementation::RunMemoryCheck()
 }
 
 /** Get the vendor string */
-const char* SystemInformationImplementation::GetVendorString() const
+char const* SystemInformationImplementation::GetVendorString() const
 {
   return this->ChipID.Vendor.c_str();
 }
 
 /** Get the OS Name */
-const char* SystemInformationImplementation::GetOSName()
+char const* SystemInformationImplementation::GetOSName()
 {
   return this->OSName.c_str();
 }
 
 /** Get the hostname */
-const char* SystemInformationImplementation::GetHostname()
+char const* SystemInformationImplementation::GetHostname()
 {
   if (this->Hostname.empty()) {
     this->Hostname = "localhost";
@@ -1623,7 +1623,7 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
         !(ifa->ifa_flags & IFF_LOOPBACK)) {
       char host[NI_MAXHOST] = { '\0' };
 
-      const size_t addrlen = (fam == AF_INET ? sizeof(struct sockaddr_in)
+      size_t const addrlen = (fam == AF_INET ? sizeof(struct sockaddr_in)
                                              : sizeof(struct sockaddr_in6));
 
       ierr = getnameinfo(ifa->ifa_addr, static_cast<socklen_t>(addrlen), host,
@@ -1656,25 +1656,25 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
 }
 
 /** Get the OS release */
-const char* SystemInformationImplementation::GetOSRelease()
+char const* SystemInformationImplementation::GetOSRelease()
 {
   return this->OSRelease.c_str();
 }
 
 /** Get the OS version */
-const char* SystemInformationImplementation::GetOSVersion()
+char const* SystemInformationImplementation::GetOSVersion()
 {
   return this->OSVersion.c_str();
 }
 
 /** Get the OS platform */
-const char* SystemInformationImplementation::GetOSPlatform()
+char const* SystemInformationImplementation::GetOSPlatform()
 {
   return this->OSPlatform.c_str();
 }
 
 /** Get the vendor ID */
-const char* SystemInformationImplementation::GetVendorID()
+char const* SystemInformationImplementation::GetVendorID()
 {
   // Return the vendor ID.
   switch (this->ChipManufacturer) {
@@ -1756,14 +1756,14 @@ std::string SystemInformationImplementation::GetSteppingCode() const
 }
 
 /** Return the stepping code of the CPU present. */
-const char* SystemInformationImplementation::GetExtendedProcessorName() const
+char const* SystemInformationImplementation::GetExtendedProcessorName() const
 {
   return this->ChipID.ProcessorName.c_str();
 }
 
 /** Return the serial number of the processor
  *  in hexadecimal: xxxx-xxxx-xxxx-xxxx-xxxx-xxxx. */
-const char* SystemInformationImplementation::GetProcessorSerialNumber() const
+char const* SystemInformationImplementation::GetProcessorSerialNumber() const
 {
   return this->ChipID.SerialNumber.c_str();
 }
@@ -2055,7 +2055,7 @@ bool SystemInformationImplementation::RetrieveCPUFeatures()
 
 /** Find the manufacturer given the vendor id */
 void SystemInformationImplementation::FindManufacturer(
-  const std::string& family)
+  std::string const& family)
 {
   if (this->ChipID.Vendor == "GenuineIntel")
     this->ChipManufacturer = Intel; // Intel Corp.
@@ -3363,7 +3363,7 @@ bool SystemInformationImplementation::RetrieveClassicalCPUIdentity()
 
 /** Extract a value from the CPUInfo file */
 std::string SystemInformationImplementation::ExtractValueFromCpuInfoFile(
-  std::string buffer, const char* word, size_t init)
+  std::string buffer, char const* word, size_t init)
 {
   size_t pos = buffer.find(word, init);
   if (pos != std::string::npos) {
@@ -3418,7 +3418,7 @@ bool SystemInformationImplementation::RetrieveInformationFromCpuInfoFile()
   buffer.resize(fileSize - 2);
   // Number of logical CPUs (combination of multiple processors, multi-core
   // and SMT)
-  const char* processor_string =
+  char const* processor_string =
 #ifdef __s390x__
     "cpu number";
 #else
@@ -3548,7 +3548,7 @@ bool SystemInformationImplementation::RetrieveInformationFromCpuInfoFile()
   // L1 Cache size
   // Different architectures may show different names for the caches.
   // Sum up everything we find.
-  std::vector<const char*> cachename;
+  std::vector<char const*> cachename;
   cachename.clear();
 
   cachename.push_back("cache size"); // e.g. x86
@@ -3676,7 +3676,7 @@ Get total system RAM in units of KiB. This may differ from the
 host total if a host-wide resource limit is applied.
 */
 long long SystemInformationImplementation::GetHostMemoryAvailable(
-  const char* hostLimitEnvVarName)
+  char const* hostLimitEnvVarName)
 {
   long long memTotal = this->GetHostMemoryTotal();
 
@@ -3687,7 +3687,7 @@ long long SystemInformationImplementation::GetHostMemoryAvailable(
   // access to it is severely restricted. The system will
   // apply a limit across a set of processes. Units are in KiB.
   if (hostLimitEnvVarName) {
-    const char* hostLimitEnvVarValue = getenv(hostLimitEnvVarName);
+    char const* hostLimitEnvVarValue = getenv(hostLimitEnvVarName);
     if (hostLimitEnvVarValue) {
       long long hostLimit = std::atoll(hostLimitEnvVarValue);
       if (hostLimit > 0) {
@@ -3704,14 +3704,14 @@ Get total system RAM in units of KiB. This may differ from the
 host total if a per-process resource limit is applied.
 */
 long long SystemInformationImplementation::GetProcMemoryAvailable(
-  const char* hostLimitEnvVarName, const char* procLimitEnvVarName)
+  char const* hostLimitEnvVarName, char const* procLimitEnvVarName)
 {
   long long memAvail = this->GetHostMemoryAvailable(hostLimitEnvVarName);
 
   // the following mechanism is provide for systems where rlimits
   // are not employed. Units are in KiB.
   if (procLimitEnvVarName) {
-    const char* procLimitEnvVarValue = getenv(procLimitEnvVarName);
+    char const* procLimitEnvVarValue = getenv(procLimitEnvVarName);
     if (procLimitEnvVarValue) {
       long long procLimit = std::atoll(procLimitEnvVarValue);
       if (procLimit > 0) {
@@ -3767,7 +3767,7 @@ long long SystemInformationImplementation::GetHostMemoryUsed()
   return (statex.ullTotalPhys - statex.ullAvailPhys) / 1024;
 #  endif
 #elif defined(__CYGWIN__)
-  const char* names[3] = { "MemTotal:", "MemFree:", nullptr };
+  char const* names[3] = { "MemTotal:", "MemFree:", nullptr };
   long long values[2] = { 0 };
   int ierr = GetFieldsFromFile("/proc/meminfo", names, values);
   if (ierr) {
@@ -3778,11 +3778,11 @@ long long SystemInformationImplementation::GetHostMemoryUsed()
   return memTotal - memFree;
 #elif defined(__linux)
   // First try to use MemAvailable, but it only works on newer kernels
-  const char* names2[3] = { "MemTotal:", "MemAvailable:", nullptr };
+  char const* names2[3] = { "MemTotal:", "MemAvailable:", nullptr };
   long long values2[2] = { 0 };
   int ierr = GetFieldsFromFile("/proc/meminfo", names2, values2);
   if (ierr) {
-    const char* names4[5] = { "MemTotal:", "MemFree:", "Buffers:", "Cached:",
+    char const* names4[5] = { "MemTotal:", "MemFree:", "Buffers:", "Cached:",
                               nullptr };
     long long values4[4] = { 0 };
     ierr = GetFieldsFromFile("/proc/meminfo", names4, values4);
@@ -3803,7 +3803,7 @@ long long SystemInformationImplementation::GetHostMemoryUsed()
   if (psz < 1) {
     return -1;
   }
-  const char* names[3] = { "Pages wired down:", "Pages active:", nullptr };
+  char const* names[3] = { "Pages wired down:", "Pages active:", nullptr };
   long long values[2] = { 0 };
   int ierr = GetFieldsFromCommand("vm_stat", names, values);
   if (ierr) {
@@ -4163,7 +4163,7 @@ bool SystemInformationImplementation::QueryLinuxMemory()
       mSwapTotal,
       mSwapFree
     };
-    const char* format[6] = { "MemTotal:%lu kB",  "MemFree:%lu kB",
+    char const* format[6] = { "MemTotal:%lu kB",  "MemFree:%lu kB",
                               "Buffers:%lu kB",   "Cached:%lu kB",
                               "SwapTotal:%lu kB", "SwapFree:%lu kB" };
     bool have[6] = { false, false, false, false, false, false };
@@ -4418,7 +4418,7 @@ unsigned char SystemInformationImplementation::GetAPICId()
 #if USE_CPUID
   if (!this->IsSMTSupported()) {
     return static_cast<unsigned char>(-1); // HT not supported
-  }                                        // Logical processor = 1
+  } // Logical processor = 1
   call_cpuid(1, Regs);
 #endif
 
@@ -4496,7 +4496,7 @@ unsigned int SystemInformationImplementation::GetNumberOfPhysicalCPU() const
 }
 
 #if defined(__APPLE__)
-static int kw_sysctlbyname_int32(const char* name, int32_t* value)
+static int kw_sysctlbyname_int32(char const* name, int32_t* value)
 {
   size_t len = sizeof(int32_t);
   int err = sysctlbyname(name, value, &len, nullptr, 0);
@@ -4506,7 +4506,7 @@ static int kw_sysctlbyname_int32(const char* name, int32_t* value)
   return err;
 }
 
-static int kw_sysctlbyname_int64(const char* name, int64_t* value)
+static int kw_sysctlbyname_int64(char const* name, int64_t* value)
 {
   size_t len = sizeof(int64_t);
   int err = sysctlbyname(name, value, &len, nullptr, 0);
@@ -4748,7 +4748,7 @@ bool SystemInformationImplementation::ParseSysCtl()
 
 /** Extract a value from sysctl command */
 std::string SystemInformationImplementation::ExtractValueFromSysCtl(
-  const char* word)
+  char const* word)
 {
   size_t pos = this->SysCtlBuffer.find(word);
   if (pos != std::string::npos) {
@@ -4763,7 +4763,7 @@ std::string SystemInformationImplementation::ExtractValueFromSysCtl(
 
 /** Run a given process */
 std::string SystemInformationImplementation::RunProcess(
-  std::vector<const char*> args)
+  std::vector<char const*> args)
 {
   std::string out;
 
@@ -4821,7 +4821,7 @@ std::string SystemInformationImplementation::RunProcess(
 }
 
 std::string SystemInformationImplementation::ParseValueFromKStat(
-  const char* arguments)
+  char const* arguments)
 {
   std::vector<std::string> args_string;
   std::string command = arguments;
@@ -4854,11 +4854,11 @@ std::string SystemInformationImplementation::ParseValueFromKStat(
   command.erase(0, start + 1);
   args_string.push_back(command);
 
-  std::vector<const char*> args;
+  std::vector<char const*> args;
   args.reserve(3 + args_string.size());
   args.push_back("kstat");
   args.push_back("-p");
-  for (const auto& i : args_string) {
+  for (auto const& i : args_string) {
     args.push_back(i.c_str());
   }
   args.push_back(nullptr);
@@ -5020,7 +5020,7 @@ bool SystemInformationImplementation::QueryQNXMemory()
 {
 #if defined(__QNX__)
   std::string buffer;
-  std::vector<const char*> args;
+  std::vector<char const*> args;
   args.clear();
 
   args.push_back("showmem");
@@ -5080,7 +5080,7 @@ bool SystemInformationImplementation::QueryQNXProcessor()
   // the output on my QNX 6.4.1 looks like this:
   // Processor1: 686 Pentium II Stepping 3 2175MHz FPU
   std::string buffer;
-  std::vector<const char*> args;
+  std::vector<char const*> args;
   args.clear();
 
   args.push_back("pidin");
@@ -5499,8 +5499,8 @@ bool SystemInformationImplementation::QueryOSInformation()
   }
   this->Hostname = name;
 
-  const char* arch = getenv("PROCESSOR_ARCHITECTURE");
-  const char* wow64 = getenv("PROCESSOR_ARCHITEW6432");
+  char const* arch = getenv("PROCESSOR_ARCHITECTURE");
+  char const* wow64 = getenv("PROCESSOR_ARCHITEW6432");
   if (arch) {
     this->OSPlatform = arch;
   }
@@ -5547,11 +5547,11 @@ bool SystemInformationImplementation::QueryOSInformation()
   return true;
 }
 
-int SystemInformationImplementation::CallSwVers(const char* arg,
+int SystemInformationImplementation::CallSwVers(char const* arg,
                                                 std::string& ver)
 {
 #ifdef __APPLE__
-  std::vector<const char*> args;
+  std::vector<char const*> args;
   args.push_back("sw_vers");
   args.push_back(arg);
   args.push_back(nullptr);
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index c8efd51d0071e6d5feb15213625dc5645426d229..cb8c214d4af73d9bd721dbf9c0ace23ad5f55c7e 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -20,47 +20,47 @@ class @KWSYS_NAMESPACE@_EXPORT SystemInformation
 
 public:
   // possible parameter values for DoesCPUSupportFeature()
-  static const long int CPU_FEATURE_MMX = 1 << 0;
-  static const long int CPU_FEATURE_MMX_PLUS = 1 << 1;
-  static const long int CPU_FEATURE_SSE = 1 << 2;
-  static const long int CPU_FEATURE_SSE2 = 1 << 3;
-  static const long int CPU_FEATURE_AMD_3DNOW = 1 << 4;
-  static const long int CPU_FEATURE_AMD_3DNOW_PLUS = 1 << 5;
-  static const long int CPU_FEATURE_IA64 = 1 << 6;
-  static const long int CPU_FEATURE_MP_CAPABLE = 1 << 7;
-  static const long int CPU_FEATURE_HYPERTHREAD = 1 << 8;
-  static const long int CPU_FEATURE_SERIALNUMBER = 1 << 9;
-  static const long int CPU_FEATURE_APIC = 1 << 10;
-  static const long int CPU_FEATURE_SSE_FP = 1 << 11;
-  static const long int CPU_FEATURE_SSE_MMX = 1 << 12;
-  static const long int CPU_FEATURE_CMOV = 1 << 13;
-  static const long int CPU_FEATURE_MTRR = 1 << 14;
-  static const long int CPU_FEATURE_L1CACHE = 1 << 15;
-  static const long int CPU_FEATURE_L2CACHE = 1 << 16;
-  static const long int CPU_FEATURE_L3CACHE = 1 << 17;
-  static const long int CPU_FEATURE_ACPI = 1 << 18;
-  static const long int CPU_FEATURE_THERMALMONITOR = 1 << 19;
-  static const long int CPU_FEATURE_TEMPSENSEDIODE = 1 << 20;
-  static const long int CPU_FEATURE_FREQUENCYID = 1 << 21;
-  static const long int CPU_FEATURE_VOLTAGEID_FREQUENCY = 1 << 22;
-  static const long int CPU_FEATURE_FPU = 1 << 23;
+  static long int const CPU_FEATURE_MMX = 1 << 0;
+  static long int const CPU_FEATURE_MMX_PLUS = 1 << 1;
+  static long int const CPU_FEATURE_SSE = 1 << 2;
+  static long int const CPU_FEATURE_SSE2 = 1 << 3;
+  static long int const CPU_FEATURE_AMD_3DNOW = 1 << 4;
+  static long int const CPU_FEATURE_AMD_3DNOW_PLUS = 1 << 5;
+  static long int const CPU_FEATURE_IA64 = 1 << 6;
+  static long int const CPU_FEATURE_MP_CAPABLE = 1 << 7;
+  static long int const CPU_FEATURE_HYPERTHREAD = 1 << 8;
+  static long int const CPU_FEATURE_SERIALNUMBER = 1 << 9;
+  static long int const CPU_FEATURE_APIC = 1 << 10;
+  static long int const CPU_FEATURE_SSE_FP = 1 << 11;
+  static long int const CPU_FEATURE_SSE_MMX = 1 << 12;
+  static long int const CPU_FEATURE_CMOV = 1 << 13;
+  static long int const CPU_FEATURE_MTRR = 1 << 14;
+  static long int const CPU_FEATURE_L1CACHE = 1 << 15;
+  static long int const CPU_FEATURE_L2CACHE = 1 << 16;
+  static long int const CPU_FEATURE_L3CACHE = 1 << 17;
+  static long int const CPU_FEATURE_ACPI = 1 << 18;
+  static long int const CPU_FEATURE_THERMALMONITOR = 1 << 19;
+  static long int const CPU_FEATURE_TEMPSENSEDIODE = 1 << 20;
+  static long int const CPU_FEATURE_FREQUENCYID = 1 << 21;
+  static long int const CPU_FEATURE_VOLTAGEID_FREQUENCY = 1 << 22;
+  static long int const CPU_FEATURE_FPU = 1 << 23;
 
 public:
   SystemInformation();
   ~SystemInformation();
 
-  SystemInformation(const SystemInformation&) = delete;
-  SystemInformation& operator=(const SystemInformation&) = delete;
+  SystemInformation(SystemInformation const&) = delete;
+  SystemInformation& operator=(SystemInformation const&) = delete;
 
-  const char* GetVendorString();
-  const char* GetVendorID();
+  char const* GetVendorString();
+  char const* GetVendorID();
   std::string GetTypeID();
   std::string GetFamilyID();
   std::string GetModelID();
   std::string GetModelName();
   std::string GetSteppingCode();
-  const char* GetExtendedProcessorName();
-  const char* GetProcessorSerialNumber();
+  char const* GetExtendedProcessorName();
+  char const* GetProcessorSerialNumber();
   int GetProcessorCacheSize();
   unsigned int GetLogicalProcessorsPerPhysical();
   float GetProcessorClockFrequency();
@@ -72,13 +72,13 @@ public:
   // on this system.
   std::string GetCPUDescription();
 
-  const char* GetHostname();
+  char const* GetHostname();
   std::string GetFullyQualifiedDomainName();
 
-  const char* GetOSName();
-  const char* GetOSRelease();
-  const char* GetOSVersion();
-  const char* GetOSPlatform();
+  char const* GetOSName();
+  char const* GetOSRelease();
+  char const* GetOSVersion();
+  char const* GetOSPlatform();
 
   int GetOSIsWindows();
   int GetOSIsLinux();
@@ -108,8 +108,8 @@ public:
   // returns an informative general description if the installed and
   // available ram on this system. See the GetHostMemoryTotal, and
   // Get{Host,Proc}MemoryAvailable methods for more information.
-  std::string GetMemoryDescription(const char* hostLimitEnvVarName = nullptr,
-                                   const char* procLimitEnvVarName = nullptr);
+  std::string GetMemoryDescription(char const* hostLimitEnvVarName = nullptr,
+                                   char const* procLimitEnvVarName = nullptr);
 
   // Retrieve amount of physical memory installed on the system in KiB
   // units.
@@ -121,7 +121,7 @@ public:
   // parallel. The amount of memory reported may differ from the host
   // total if a host wide resource limit is applied. Such reource limits
   // are reported to us via an application specified environment variable.
-  long long GetHostMemoryAvailable(const char* hostLimitEnvVarName = nullptr);
+  long long GetHostMemoryAvailable(char const* hostLimitEnvVarName = nullptr);
 
   // Get total system RAM in units of KiB available to this process.
   // This may differ from the host available if a per-process resource
@@ -129,8 +129,8 @@ public:
   // system via rlimit API. Resource limits that are not imposed via
   // rlimit API may be reported to us via an application specified
   // environment variable.
-  long long GetProcMemoryAvailable(const char* hostLimitEnvVarName = nullptr,
-                                   const char* procLimitEnvVarName = nullptr);
+  long long GetProcMemoryAvailable(char const* hostLimitEnvVarName = nullptr,
+                                   char const* procLimitEnvVarName = nullptr);
 
   // Get the system RAM used by all processes on the host, in units of KiB.
   long long GetHostMemoryUsed();
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 502f7a8fb65326aa22c15d64340ba77c1d86bc68..39846c0f3e10f2322f9768569b1bee092baa5684 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -104,7 +104,7 @@
 #  include <windows.h>
 #  include <winioctl.h>
 #  ifndef INVALID_FILE_ATTRIBUTES
-#    define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#    define INVALID_FILE_ATTRIBUTES ((DWORD) - 1)
 #  endif
 #  ifndef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
 #    define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2)
@@ -259,12 +259,12 @@ static inline void usleep(unsigned int msec)
 }
 
 // BeOS 5 also doesn't have realpath(), but its C++ API offers something close.
-static inline char* realpath(const char* path, char* resolved_path)
+static inline char* realpath(char const* path, char* resolved_path)
 {
-  const size_t maxlen = KWSYS_SYSTEMTOOLS_MAXPATH;
+  size_t const maxlen = KWSYS_SYSTEMTOOLS_MAXPATH;
   snprintf(resolved_path, maxlen, "%s", path);
   BPath normalized(resolved_path, nullptr, true);
-  const char* resolved = normalized.Path();
+  char const* resolved = normalized.Path();
   if (resolved) // nullptr == No such file.
   {
     if (snprintf(resolved_path, maxlen, "%s", resolved) < maxlen) {
@@ -296,7 +296,7 @@ static time_t windows_filetime_to_posix_time(const FILETIME& ft)
 typedef KWSYS_NAMESPACE::SystemTools::mode_t mode_t;
 #  endif
 
-inline int Mkdir(const std::string& dir, const mode_t* mode)
+inline int Mkdir(std::string const& dir, mode_t const* mode)
 {
   int ret =
     _wmkdir(KWSYS_NAMESPACE::Encoding::ToWindowsExtendedPath(dir).c_str());
@@ -304,12 +304,12 @@ inline int Mkdir(const std::string& dir, const mode_t* mode)
     KWSYS_NAMESPACE::SystemTools::SetPermissions(dir, *mode);
   return ret;
 }
-inline int Rmdir(const std::string& dir)
+inline int Rmdir(std::string const& dir)
 {
   return _wrmdir(
     KWSYS_NAMESPACE::Encoding::ToWindowsExtendedPath(dir).c_str());
 }
-inline const char* Getcwd(char* buf, unsigned int len)
+inline char const* Getcwd(char* buf, unsigned int len)
 {
   std::vector<wchar_t> w_buf(len);
   if (_wgetcwd(&w_buf[0], len)) {
@@ -327,11 +327,11 @@ inline const char* Getcwd(char* buf, unsigned int len)
   }
   return 0;
 }
-inline int Chdir(const std::string& dir)
+inline int Chdir(std::string const& dir)
 {
   return _wchdir(KWSYS_NAMESPACE::Encoding::ToWide(dir).c_str());
 }
-inline void Realpath(const std::string& path, std::string& resolved_path,
+inline void Realpath(std::string const& path, std::string& resolved_path,
                      std::string* errorMessage = nullptr)
 {
   std::wstring tmp = KWSYS_NAMESPACE::Encoding::ToWide(path);
@@ -367,24 +367,24 @@ inline void Realpath(const std::string& path, std::string& resolved_path,
 
 #  include <fcntl.h>
 #  include <unistd.h>
-inline int Mkdir(const std::string& dir, const mode_t* mode)
+inline int Mkdir(std::string const& dir, mode_t const* mode)
 {
   return mkdir(dir.c_str(), mode ? *mode : 00777);
 }
-inline int Rmdir(const std::string& dir)
+inline int Rmdir(std::string const& dir)
 {
   return rmdir(dir.c_str());
 }
-inline const char* Getcwd(char* buf, unsigned int len)
+inline char const* Getcwd(char* buf, unsigned int len)
 {
   return getcwd(buf, len);
 }
 
-inline int Chdir(const std::string& dir)
+inline int Chdir(std::string const& dir)
 {
   return chdir(dir.c_str());
 }
-inline void Realpath(const std::string& path, std::string& resolved_path,
+inline void Realpath(std::string const& path, std::string& resolved_path,
                      std::string* errorMessage = nullptr)
 {
   char resolved_name[KWSYS_SYSTEMTOOLS_MAXPATH];
@@ -434,11 +434,11 @@ using envchar = char;
 /* Order by environment key only (VAR from VAR=VALUE).  */
 struct kwsysEnvCompare
 {
-  bool operator()(const envchar* l, const envchar* r) const
+  bool operator()(envchar const* l, envchar const* r) const
   {
 #if defined(_WIN32)
-    const wchar_t* leq = wcschr(l, L'=');
-    const wchar_t* req = wcschr(r, L'=');
+    wchar_t const* leq = wcschr(l, L'=');
+    wchar_t const* req = wcschr(r, L'=');
     size_t llen = leq ? (leq - l) : wcslen(l);
     size_t rlen = req ? (req - r) : wcslen(r);
     if (llen == rlen) {
@@ -447,8 +447,8 @@ struct kwsysEnvCompare
       return wcscmp(l, r) < 0;
     }
 #else
-    const char* leq = strchr(l, '=');
-    const char* req = strchr(r, '=');
+    char const* leq = strchr(l, '=');
+    char const* req = strchr(r, '=');
     size_t llen = leq ? static_cast<size_t>(leq - l) : strlen(l);
     size_t rlen = req ? static_cast<size_t>(req - r) : strlen(r);
     if (llen == rlen) {
@@ -460,27 +460,27 @@ struct kwsysEnvCompare
   }
 };
 
-class kwsysEnvSet : public std::set<const envchar*, kwsysEnvCompare>
+class kwsysEnvSet : public std::set<envchar const*, kwsysEnvCompare>
 {
 public:
   class Free
   {
-    const envchar* Env;
+    envchar const* Env;
 
   public:
-    Free(const envchar* env)
+    Free(envchar const* env)
       : Env(env)
     {
     }
     ~Free() { free(const_cast<envchar*>(this->Env)); }
 
-    Free(const Free&) = delete;
-    Free& operator=(const Free&) = delete;
+    Free(Free const&) = delete;
+    Free& operator=(Free const&) = delete;
   };
 
-  const envchar* Release(const envchar* env)
+  envchar const* Release(envchar const* env)
   {
-    const envchar* old = nullptr;
+    envchar const* old = nullptr;
     auto i = this->find(env);
     if (i != this->end()) {
       old = *i;
@@ -498,28 +498,28 @@ class SystemToolsStatic
 public:
 #ifdef _WIN32
   static std::string GetCasePathName(std::string const& pathIn);
-  static const char* GetEnvBuffered(const char* key);
+  static char const* GetEnvBuffered(char const* key);
   std::map<std::string, std::string> EnvMap;
 #endif
 
   /**
    * Actual implementation of ReplaceString.
    */
-  static void ReplaceString(std::string& source, const char* replace,
-                            size_t replaceSize, const std::string& with);
+  static void ReplaceString(std::string& source, char const* replace,
+                            size_t replaceSize, std::string const& with);
 
   /**
    * Actual implementation of FileIsFullPath.
    */
-  static bool FileIsFullPath(const char*, size_t);
+  static bool FileIsFullPath(char const*, size_t);
 
   /**
    * Find a filename (file or directory) in the system PATH, with
    * optional extra paths.
    */
   static std::string FindName(
-    const std::string& name,
-    const std::vector<std::string>& userPaths = std::vector<std::string>(),
+    std::string const& name,
+    std::vector<std::string> const& userPaths = std::vector<std::string>(),
     bool no_system_path = false);
 };
 
@@ -551,7 +551,7 @@ std::string SystemToolsStatic::GetCasePathName(std::string const& pathIn)
   if (casePath.size() > 1 && casePath[1] == ':') {
     casePath[0] = toupper(casePath[0]);
   }
-  const char* sep = "";
+  char const* sep = "";
 
   // If network path, fill casePath with server/share so FindFirstFile
   // will work after that.  Maybe someday call other APIs to get
@@ -600,13 +600,13 @@ std::string SystemToolsStatic::GetCasePathName(std::string const& pathIn)
 #endif
 
 // adds the elements of the env variable path to the arg passed in
-void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
+void SystemTools::GetPath(std::vector<std::string>& path, char const* env)
 {
   size_t const old_size = path.size();
 #if defined(_WIN32) && !defined(__CYGWIN__)
-  const char pathSep = ';';
+  char const pathSep = ';';
 #else
-  const char pathSep = ':';
+  char const pathSep = ':';
 #endif
   if (!env) {
     env = "PATH";
@@ -637,7 +637,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
 }
 
 #if defined(_WIN32)
-const char* SystemToolsStatic::GetEnvBuffered(const char* key)
+char const* SystemToolsStatic::GetEnvBuffered(char const* key)
 {
   std::string env;
   if (SystemTools::GetEnv(key, env)) {
@@ -651,7 +651,7 @@ const char* SystemToolsStatic::GetEnvBuffered(const char* key)
 }
 #endif
 
-const char* SystemTools::GetEnv(const char* key)
+char const* SystemTools::GetEnv(char const* key)
 {
 #if defined(_WIN32)
   return SystemToolsStatic::GetEnvBuffered(key);
@@ -660,7 +660,7 @@ const char* SystemTools::GetEnv(const char* key)
 #endif
 }
 
-const char* SystemTools::GetEnv(const std::string& key)
+char const* SystemTools::GetEnv(std::string const& key)
 {
 #if defined(_WIN32)
   return SystemToolsStatic::GetEnvBuffered(key.c_str());
@@ -669,7 +669,7 @@ const char* SystemTools::GetEnv(const std::string& key)
 #endif
 }
 
-bool SystemTools::GetEnv(const char* key, std::string& result)
+bool SystemTools::GetEnv(char const* key, std::string& result)
 {
 #if defined(_WIN32)
   auto wide_key = Encoding::ToWide(key);
@@ -683,7 +683,7 @@ bool SystemTools::GetEnv(const char* key, std::string& result)
   result = Encoding::ToNarrow(wide_result);
   return true;
 #else
-  const char* v = getenv(key);
+  char const* v = getenv(key);
   if (v) {
     result = v;
     return true;
@@ -692,23 +692,23 @@ bool SystemTools::GetEnv(const char* key, std::string& result)
   return false;
 }
 
-bool SystemTools::GetEnv(const std::string& key, std::string& result)
+bool SystemTools::GetEnv(std::string const& key, std::string& result)
 {
   return SystemTools::GetEnv(key.c_str(), result);
 }
 
-bool SystemTools::HasEnv(const char* key)
+bool SystemTools::HasEnv(char const* key)
 {
 #if defined(_WIN32)
-  const std::wstring wkey = Encoding::ToWide(key);
-  const wchar_t* v = _wgetenv(wkey.c_str());
+  std::wstring const wkey = Encoding::ToWide(key);
+  wchar_t const* v = _wgetenv(wkey.c_str());
 #else
-  const char* v = getenv(key);
+  char const* v = getenv(key);
 #endif
   return v;
 }
 
-bool SystemTools::HasEnv(const std::string& key)
+bool SystemTools::HasEnv(std::string const& key)
 {
   return SystemTools::HasEnv(key.c_str());
 }
@@ -716,7 +716,7 @@ bool SystemTools::HasEnv(const std::string& key)
 #if KWSYS_CXX_HAS_UNSETENV
 /* unsetenv("A") removes A from the environment.
    On older platforms it returns void instead of int.  */
-static int kwsysUnPutEnv(const std::string& env)
+static int kwsysUnPutEnv(std::string const& env)
 {
   size_t pos = env.find('=');
   if (pos != std::string::npos) {
@@ -732,7 +732,7 @@ static int kwsysUnPutEnv(const std::string& env)
 /* putenv("A") removes A from the environment.  It must not put the
    memory in the environment because it does not have any "=" syntax.  */
 
-static int kwsysUnPutEnv(const std::string& env)
+static int kwsysUnPutEnv(std::string const& env)
 {
   int err = 0;
   std::string buf = env.substr(0, env.find('='));
@@ -771,7 +771,7 @@ static int kwsysUnPutEnv(std::string const& env)
 
 #else
 /* Manipulate the "environ" global directly.  */
-static int kwsysUnPutEnv(const std::string& env)
+static int kwsysUnPutEnv(std::string const& env)
 {
   size_t pos = env.find('=');
   size_t const len = pos == std::string::npos ? env.size() : pos;
@@ -796,7 +796,7 @@ static int kwsysUnPutEnv(const std::string& env)
 
 /* setenv("A", "B", 1) will set A=B in the environment and makes its
    own copies of the strings.  */
-bool SystemTools::PutEnv(const std::string& env)
+bool SystemTools::PutEnv(std::string const& env)
 {
   size_t pos = env.find('=');
   if (pos != std::string::npos) {
@@ -807,7 +807,7 @@ bool SystemTools::PutEnv(const std::string& env)
   }
 }
 
-bool SystemTools::UnPutEnv(const std::string& env)
+bool SystemTools::UnPutEnv(std::string const& env)
 {
   return kwsysUnPutEnv(env) == 0;
 }
@@ -832,7 +832,7 @@ public:
   {
     for (iterator i = this->begin(); i != this->end(); ++i) {
 #  if defined(_WIN32)
-      const std::string s = Encoding::ToNarrow(*i);
+      std::string const s = Encoding::ToNarrow(*i);
       kwsysUnPutEnv(s);
 #  else
       kwsysUnPutEnv(*i);
@@ -840,10 +840,10 @@ public:
       free(const_cast<envchar*>(*i));
     }
   }
-  bool Put(const char* env)
+  bool Put(char const* env)
   {
 #  if defined(_WIN32)
-    const std::wstring wEnv = Encoding::ToWide(env);
+    std::wstring const wEnv = Encoding::ToWide(env);
     wchar_t* newEnv = _wcsdup(wEnv.c_str());
 #  else
     char* newEnv = strdup(env);
@@ -856,10 +856,10 @@ public:
     return putenv(newEnv) == 0;
 #  endif
   }
-  bool UnPut(const char* env)
+  bool UnPut(char const* env)
   {
 #  if defined(_WIN32)
-    const std::wstring wEnv = Encoding::ToWide(env);
+    std::wstring const wEnv = Encoding::ToWide(env);
     Free oldEnv(this->Release(wEnv.c_str()));
 #  else
     Free oldEnv(this->Release(env));
@@ -870,19 +870,19 @@ public:
 
 static kwsysEnv kwsysEnvInstance;
 
-bool SystemTools::PutEnv(const std::string& env)
+bool SystemTools::PutEnv(std::string const& env)
 {
   return kwsysEnvInstance.Put(env.c_str());
 }
 
-bool SystemTools::UnPutEnv(const std::string& env)
+bool SystemTools::UnPutEnv(std::string const& env)
 {
   return kwsysEnvInstance.UnPut(env.c_str());
 }
 
 #endif
 
-const char* SystemTools::GetExecutableExtension()
+char const* SystemTools::GetExecutableExtension()
 {
 #if defined(_WIN32) || defined(__CYGWIN__) || defined(__VMS)
   return ".exe";
@@ -891,7 +891,7 @@ const char* SystemTools::GetExecutableExtension()
 #endif
 }
 
-FILE* SystemTools::Fopen(const std::string& file, const char* mode)
+FILE* SystemTools::Fopen(std::string const& file, char const* mode)
 {
 #ifdef _WIN32
   // Remove any 'e', which is supported on UNIX, but not Windows.
@@ -905,7 +905,7 @@ FILE* SystemTools::Fopen(const std::string& file, const char* mode)
 #endif
 }
 
-Status SystemTools::MakeDirectory(const char* path, const mode_t* mode)
+Status SystemTools::MakeDirectory(char const* path, mode_t const* mode)
 {
   if (!path) {
     return Status::POSIX(EINVAL);
@@ -913,7 +913,7 @@ Status SystemTools::MakeDirectory(const char* path, const mode_t* mode)
   return SystemTools::MakeDirectory(std::string(path), mode);
 }
 
-Status SystemTools::MakeDirectory(std::string const& path, const mode_t* mode)
+Status SystemTools::MakeDirectory(std::string const& path, mode_t const* mode)
 {
   if (path.empty()) {
     return Status::POSIX(EINVAL);
@@ -950,8 +950,8 @@ Status SystemTools::MakeDirectory(std::string const& path, const mode_t* mode)
 // replace replace with with as many times as it shows up in source.
 // write the result into source.
 void SystemTools::ReplaceString(std::string& source,
-                                const std::string& replace,
-                                const std::string& with)
+                                std::string const& replace,
+                                std::string const& with)
 {
   // do while hangs if replaceSize is 0
   if (replace.empty()) {
@@ -962,8 +962,8 @@ void SystemTools::ReplaceString(std::string& source,
                                    with);
 }
 
-void SystemTools::ReplaceString(std::string& source, const char* replace,
-                                const char* with)
+void SystemTools::ReplaceString(std::string& source, char const* replace,
+                                char const* with)
 {
   // do while hangs if replaceSize is 0
   if (!*replace) {
@@ -974,11 +974,11 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
                                    with ? with : "");
 }
 
-void SystemToolsStatic::ReplaceString(std::string& source, const char* replace,
+void SystemToolsStatic::ReplaceString(std::string& source, char const* replace,
                                       size_t replaceSize,
-                                      const std::string& with)
+                                      std::string const& with)
 {
-  const char* src = source.c_str();
+  char const* src = source.c_str();
   char* searchPos = const_cast<char*>(strstr(src, replace));
 
   // get out quick if string is not found
@@ -1017,7 +1017,7 @@ void SystemToolsStatic::ReplaceString(std::string& source, const char* replace,
 #    define KWSYS_ST_KEY_WOW64_64KEY 0x0100
 #  endif
 
-static bool hasPrefix(const std::string& s, const char* pattern,
+static bool hasPrefix(std::string const& s, char const* pattern,
                       std::string::size_type spos)
 {
   size_t plen = strlen(pattern);
@@ -1026,7 +1026,7 @@ static bool hasPrefix(const std::string& s, const char* pattern,
   return s.compare(0, plen, pattern) == 0;
 }
 
-static bool SystemToolsParseRegistryKey(const std::string& key,
+static bool SystemToolsParseRegistryKey(std::string const& key,
                                         HKEY& primaryKey, std::wstring& second,
                                         std::string* valuename)
 {
@@ -1077,7 +1077,7 @@ static DWORD SystemToolsMakeRegistryMode(DWORD mode,
 #endif
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-bool SystemTools::GetRegistrySubKeys(const std::string& key,
+bool SystemTools::GetRegistrySubKeys(std::string const& key,
                                      std::vector<std::string>& subkeys,
                                      KeyWOW64 view)
 {
@@ -1108,7 +1108,7 @@ bool SystemTools::GetRegistrySubKeys(const std::string& key,
   return true;
 }
 #else
-bool SystemTools::GetRegistrySubKeys(const std::string&,
+bool SystemTools::GetRegistrySubKeys(std::string const&,
                                      std::vector<std::string>&, KeyWOW64)
 {
   return false;
@@ -1123,7 +1123,7 @@ bool SystemTools::GetRegistrySubKeys(const std::string&,
 //      =>  will return the data of the "Root" value of the key
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-bool SystemTools::ReadRegistryValue(const std::string& key, std::string& value,
+bool SystemTools::ReadRegistryValue(std::string const& key, std::string& value,
                                     KeyWOW64 view)
 {
   bool valueset = false;
@@ -1164,7 +1164,7 @@ bool SystemTools::ReadRegistryValue(const std::string& key, std::string& value,
   return valueset;
 }
 #else
-bool SystemTools::ReadRegistryValue(const std::string&, std::string&, KeyWOW64)
+bool SystemTools::ReadRegistryValue(std::string const&, std::string&, KeyWOW64)
 {
   return false;
 }
@@ -1178,8 +1178,8 @@ bool SystemTools::ReadRegistryValue(const std::string&, std::string&, KeyWOW64)
 //      =>  will set the data of the "Root" value of the key
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-bool SystemTools::WriteRegistryValue(const std::string& key,
-                                     const std::string& value, KeyWOW64 view)
+bool SystemTools::WriteRegistryValue(std::string const& key,
+                                     std::string const& value, KeyWOW64 view)
 {
   HKEY primaryKey = HKEY_CURRENT_USER;
   std::wstring second;
@@ -1208,7 +1208,7 @@ bool SystemTools::WriteRegistryValue(const std::string& key,
   return false;
 }
 #else
-bool SystemTools::WriteRegistryValue(const std::string&, const std::string&,
+bool SystemTools::WriteRegistryValue(std::string const&, std::string const&,
                                      KeyWOW64)
 {
   return false;
@@ -1223,7 +1223,7 @@ bool SystemTools::WriteRegistryValue(const std::string&, const std::string&,
 //      =>  will delete the data of the "Root" value of the key
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-bool SystemTools::DeleteRegistryValue(const std::string& key, KeyWOW64 view)
+bool SystemTools::DeleteRegistryValue(std::string const& key, KeyWOW64 view)
 {
   HKEY primaryKey = HKEY_CURRENT_USER;
   std::wstring second;
@@ -1246,7 +1246,7 @@ bool SystemTools::DeleteRegistryValue(const std::string& key, KeyWOW64 view)
   return false;
 }
 #else
-bool SystemTools::DeleteRegistryValue(const std::string&, KeyWOW64)
+bool SystemTools::DeleteRegistryValue(std::string const&, KeyWOW64)
 {
   return false;
 }
@@ -1262,14 +1262,14 @@ SystemTools::WindowsFileId::WindowsFileId(unsigned long volumeSerialNumber,
 {
 }
 
-bool SystemTools::WindowsFileId::operator==(const WindowsFileId& o) const
+bool SystemTools::WindowsFileId::operator==(WindowsFileId const& o) const
 {
   return (m_volumeSerialNumber == o.m_volumeSerialNumber &&
           m_fileIndexHigh == o.m_fileIndexHigh &&
           m_fileIndexLow == o.m_fileIndexLow);
 }
 
-bool SystemTools::WindowsFileId::operator!=(const WindowsFileId& o) const
+bool SystemTools::WindowsFileId::operator!=(WindowsFileId const& o) const
 {
   return !(*this == o);
 }
@@ -1282,20 +1282,20 @@ SystemTools::UnixFileId::UnixFileId(dev_t volumeSerialNumber,
 {
 }
 
-bool SystemTools::UnixFileId::operator==(const UnixFileId& o) const
+bool SystemTools::UnixFileId::operator==(UnixFileId const& o) const
 {
   return (m_volumeSerialNumber == o.m_volumeSerialNumber &&
           m_fileSerialNumber == o.m_fileSerialNumber &&
           m_fileSize == o.m_fileSize);
 }
 
-bool SystemTools::UnixFileId::operator!=(const UnixFileId& o) const
+bool SystemTools::UnixFileId::operator!=(UnixFileId const& o) const
 {
   return !(*this == o);
 }
 #endif
 
-bool SystemTools::GetFileId(const std::string& file, FileId& id)
+bool SystemTools::GetFileId(std::string const& file, FileId& id)
 {
 #ifdef _WIN32
   HANDLE hFile =
@@ -1321,7 +1321,7 @@ bool SystemTools::GetFileId(const std::string& file, FileId& id)
 #endif
 }
 
-bool SystemTools::SameFile(const std::string& file1, const std::string& file2)
+bool SystemTools::SameFile(std::string const& file1, std::string const& file2)
 {
 #ifdef _WIN32
   HANDLE hFile1, hFile2;
@@ -1369,7 +1369,7 @@ bool SystemTools::SameFile(const std::string& file1, const std::string& file2)
 #endif
 }
 
-bool SystemTools::PathExists(const std::string& path)
+bool SystemTools::PathExists(std::string const& path)
 {
   if (path.empty()) {
     return false;
@@ -1383,7 +1383,7 @@ bool SystemTools::PathExists(const std::string& path)
 #endif
 }
 
-bool SystemTools::FileExists(const char* filename)
+bool SystemTools::FileExists(char const* filename)
 {
   if (!filename) {
     return false;
@@ -1391,13 +1391,13 @@ bool SystemTools::FileExists(const char* filename)
   return SystemTools::FileExists(std::string(filename));
 }
 
-bool SystemTools::FileExists(const std::string& filename)
+bool SystemTools::FileExists(std::string const& filename)
 {
   if (filename.empty()) {
     return false;
   }
 #if defined(_WIN32)
-  const std::wstring path = Encoding::ToWindowsExtendedPath(filename);
+  std::wstring const path = Encoding::ToWindowsExtendedPath(filename);
   DWORD attr = GetFileAttributesW(path.c_str());
   if (attr == INVALID_FILE_ATTRIBUTES) {
     return false;
@@ -1454,7 +1454,7 @@ bool SystemTools::FileExists(const std::string& filename)
 #endif
 }
 
-bool SystemTools::FileExists(const char* filename, bool isFile)
+bool SystemTools::FileExists(char const* filename, bool isFile)
 {
   if (!filename) {
     return false;
@@ -1462,7 +1462,7 @@ bool SystemTools::FileExists(const char* filename, bool isFile)
   return SystemTools::FileExists(std::string(filename), isFile);
 }
 
-bool SystemTools::FileExists(const std::string& filename, bool isFile)
+bool SystemTools::FileExists(std::string const& filename, bool isFile)
 {
   if (SystemTools::FileExists(filename)) {
     // If isFile is set return not FileIsDirectory,
@@ -1472,7 +1472,7 @@ bool SystemTools::FileExists(const std::string& filename, bool isFile)
   return false;
 }
 
-bool SystemTools::TestFileAccess(const char* filename,
+bool SystemTools::TestFileAccess(char const* filename,
                                  TestFilePermissions permissions)
 {
   if (!filename) {
@@ -1481,7 +1481,7 @@ bool SystemTools::TestFileAccess(const char* filename,
   return SystemTools::TestFileAccess(std::string(filename), permissions);
 }
 
-bool SystemTools::TestFileAccess(const std::string& filename,
+bool SystemTools::TestFileAccess(std::string const& filename,
                                  TestFilePermissions permissions)
 {
   if (filename.empty()) {
@@ -1502,7 +1502,7 @@ bool SystemTools::TestFileAccess(const std::string& filename,
 #endif
 }
 
-int SystemTools::Stat(const char* path, SystemTools::Stat_t* buf)
+int SystemTools::Stat(char const* path, SystemTools::Stat_t* buf)
 {
   if (!path) {
     errno = EFAULT;
@@ -1511,7 +1511,7 @@ int SystemTools::Stat(const char* path, SystemTools::Stat_t* buf)
   return SystemTools::Stat(std::string(path), buf);
 }
 
-int SystemTools::Stat(const std::string& path, SystemTools::Stat_t* buf)
+int SystemTools::Stat(std::string const& path, SystemTools::Stat_t* buf)
 {
   if (path.empty()) {
     errno = ENOENT;
@@ -1637,7 +1637,7 @@ Status SystemTools::FileTimeCompare(std::string const& f1,
 
 // Return a capitalized string (i.e the first letter is uppercased, all other
 // are lowercased)
-std::string SystemTools::Capitalized(const std::string& s)
+std::string SystemTools::Capitalized(std::string const& s)
 {
   std::string n;
   if (s.empty()) {
@@ -1652,7 +1652,7 @@ std::string SystemTools::Capitalized(const std::string& s)
 }
 
 // Return capitalized words
-std::string SystemTools::CapitalizedWords(const std::string& s)
+std::string SystemTools::CapitalizedWords(std::string const& s)
 {
   std::string n(s);
   for (size_t i = 0; i < s.size(); i++) {
@@ -1672,7 +1672,7 @@ std::string SystemTools::CapitalizedWords(const std::string& s)
 }
 
 // Return uncapitalized words
-std::string SystemTools::UnCapitalizedWords(const std::string& s)
+std::string SystemTools::UnCapitalizedWords(std::string const& s)
 {
   std::string n(s);
   for (size_t i = 0; i < s.size(); i++) {
@@ -1692,7 +1692,7 @@ std::string SystemTools::UnCapitalizedWords(const std::string& s)
 }
 
 // only works for words with at least two letters
-std::string SystemTools::AddSpaceBetweenCapitalizedWords(const std::string& s)
+std::string SystemTools::AddSpaceBetweenCapitalizedWords(std::string const& s)
 {
   std::string n;
   if (!s.empty()) {
@@ -1708,7 +1708,7 @@ std::string SystemTools::AddSpaceBetweenCapitalizedWords(const std::string& s)
   return n;
 }
 
-char* SystemTools::AppendStrings(const char* str1, const char* str2)
+char* SystemTools::AppendStrings(char const* str1, char const* str2)
 {
   if (!str1) {
     return SystemTools::DuplicateString(str2);
@@ -1726,8 +1726,8 @@ char* SystemTools::AppendStrings(const char* str1, const char* str2)
   return newstr;
 }
 
-char* SystemTools::AppendStrings(const char* str1, const char* str2,
-                                 const char* str3)
+char* SystemTools::AppendStrings(char const* str1, char const* str2,
+                                 char const* str3)
 {
   if (!str1) {
     return SystemTools::AppendStrings(str2, str3);
@@ -1751,7 +1751,7 @@ char* SystemTools::AppendStrings(const char* str1, const char* str2,
 }
 
 // Return a lower case string
-std::string SystemTools::LowerCase(const std::string& s)
+std::string SystemTools::LowerCase(std::string const& s)
 {
   std::string n;
   n.resize(s.size());
@@ -1762,7 +1762,7 @@ std::string SystemTools::LowerCase(const std::string& s)
 }
 
 // Return a lower case string
-std::string SystemTools::UpperCase(const std::string& s)
+std::string SystemTools::UpperCase(std::string const& s)
 {
   std::string n;
   n.resize(s.size());
@@ -1773,7 +1773,7 @@ std::string SystemTools::UpperCase(const std::string& s)
 }
 
 // Count char in string
-size_t SystemTools::CountChar(const char* str, char c)
+size_t SystemTools::CountChar(char const* str, char c)
 {
   size_t count = 0;
 
@@ -1789,7 +1789,7 @@ size_t SystemTools::CountChar(const char* str, char c)
 }
 
 // Remove chars in string
-char* SystemTools::RemoveChars(const char* str, const char* toremove)
+char* SystemTools::RemoveChars(char const* str, char const* toremove)
 {
   if (!str) {
     return nullptr;
@@ -1797,7 +1797,7 @@ char* SystemTools::RemoveChars(const char* str, const char* toremove)
   char* clean_str = new char[strlen(str) + 1];
   char* ptr = clean_str;
   while (*str) {
-    const char* str2 = toremove;
+    char const* str2 = toremove;
     while (*str2 && *str != *str2) {
       ++str2;
     }
@@ -1811,7 +1811,7 @@ char* SystemTools::RemoveChars(const char* str, const char* toremove)
 }
 
 // Remove chars in string
-char* SystemTools::RemoveCharsButUpperHex(const char* str)
+char* SystemTools::RemoveCharsButUpperHex(char const* str)
 {
   if (!str) {
     return nullptr;
@@ -1829,13 +1829,13 @@ char* SystemTools::RemoveCharsButUpperHex(const char* str)
 }
 
 // Replace chars in string
-char* SystemTools::ReplaceChars(char* str, const char* toreplace,
+char* SystemTools::ReplaceChars(char* str, char const* toreplace,
                                 char replacement)
 {
   if (str) {
     char* ptr = str;
     while (*ptr) {
-      const char* ptr2 = toreplace;
+      char const* ptr2 = toreplace;
       while (*ptr2) {
         if (*ptr == *ptr2) {
           *ptr = replacement;
@@ -1849,7 +1849,7 @@ char* SystemTools::ReplaceChars(char* str, const char* toreplace,
 }
 
 // Returns if string starts with another string
-bool SystemTools::StringStartsWith(const char* str1, const char* str2)
+bool SystemTools::StringStartsWith(char const* str1, char const* str2)
 {
   if (!str1 || !str2) {
     return false;
@@ -1859,7 +1859,7 @@ bool SystemTools::StringStartsWith(const char* str1, const char* str2)
 }
 
 // Returns if string starts with another string
-bool SystemTools::StringStartsWith(const std::string& str1, const char* str2)
+bool SystemTools::StringStartsWith(std::string const& str1, char const* str2)
 {
   if (!str2) {
     return false;
@@ -1869,7 +1869,7 @@ bool SystemTools::StringStartsWith(const std::string& str1, const char* str2)
 }
 
 // Returns if string ends with another string
-bool SystemTools::StringEndsWith(const char* str1, const char* str2)
+bool SystemTools::StringEndsWith(char const* str1, char const* str2)
 {
   if (!str1 || !str2) {
     return false;
@@ -1880,7 +1880,7 @@ bool SystemTools::StringEndsWith(const char* str1, const char* str2)
 }
 
 // Returns if string ends with another string
-bool SystemTools::StringEndsWith(const std::string& str1, const char* str2)
+bool SystemTools::StringEndsWith(std::string const& str1, char const* str2)
 {
   if (!str2) {
     return false;
@@ -1892,7 +1892,7 @@ bool SystemTools::StringEndsWith(const std::string& str1, const char* str2)
 }
 
 // Returns a pointer to the last occurrence of str2 in str1
-const char* SystemTools::FindLastString(const char* str1, const char* str2)
+char const* SystemTools::FindLastString(char const* str1, char const* str2)
 {
   if (!str1 || !str2) {
     return nullptr;
@@ -1900,7 +1900,7 @@ const char* SystemTools::FindLastString(const char* str1, const char* str2)
 
   size_t len1 = strlen(str1), len2 = strlen(str2);
   if (len1 >= len2) {
-    const char* ptr = str1 + len1 - len2;
+    char const* ptr = str1 + len1 - len2;
     do {
       if (!strncmp(ptr, str2, len2)) {
         return ptr;
@@ -1912,7 +1912,7 @@ const char* SystemTools::FindLastString(const char* str1, const char* str2)
 }
 
 // Duplicate string
-char* SystemTools::DuplicateString(const char* str)
+char* SystemTools::DuplicateString(char const* str)
 {
   if (str) {
     char* newstr = new char[strlen(str) + 1];
@@ -1922,7 +1922,7 @@ char* SystemTools::DuplicateString(const char* str)
 }
 
 // Return a cropped string
-std::string SystemTools::CropString(const std::string& s, size_t max_len)
+std::string SystemTools::CropString(std::string const& s, size_t max_len)
 {
   if (s.empty() || max_len == 0 || max_len >= s.size()) {
     return s;
@@ -1949,7 +1949,7 @@ std::string SystemTools::CropString(const std::string& s, size_t max_len)
   return n;
 }
 
-std::vector<std::string> SystemTools::SplitString(const std::string& p,
+std::vector<std::string> SystemTools::SplitString(std::string const& p,
                                                   char sep, bool isPath)
 {
   std::string path = p;
@@ -1973,7 +1973,7 @@ std::vector<std::string> SystemTools::SplitString(const std::string& p,
   return paths;
 }
 
-int SystemTools::EstimateFormatLength(const char* format, va_list ap)
+int SystemTools::EstimateFormatLength(char const* format, va_list ap)
 {
   if (!format) {
     return 0;
@@ -1988,7 +1988,7 @@ int SystemTools::EstimateFormatLength(const char* format, va_list ap)
 
   // Increase the length for every argument in the format.
 
-  const char* cur = format;
+  char const* cur = format;
   while (*cur) {
     if (*cur++ == '%') {
       // Skip "%%" since it doesn't correspond to a va_arg.
@@ -2031,8 +2031,8 @@ int SystemTools::EstimateFormatLength(const char* format, va_list ap)
   return static_cast<int>(length);
 }
 
-std::string SystemTools::EscapeChars(const char* str,
-                                     const char* chars_to_escape,
+std::string SystemTools::EscapeChars(char const* str,
+                                     char const* chars_to_escape,
                                      char escape_char)
 {
   std::string n;
@@ -2042,7 +2042,7 @@ std::string SystemTools::EscapeChars(const char* str,
     } else {
       n.reserve(strlen(str));
       while (*str) {
-        const char* ptr = chars_to_escape;
+        char const* ptr = chars_to_escape;
         while (*ptr) {
           if (*str == *ptr) {
             n += escape_char;
@@ -2066,8 +2066,8 @@ static void ConvertVMSToUnix(std::string& path)
   if (rootEnd != std::string::npos) {
     std::string root = path.substr(0, rootEnd);
     std::string pathPart = path.substr(rootEnd + 2, pathEnd - rootEnd - 2);
-    const char* pathCString = pathPart.c_str();
-    const char* pos0 = pathCString;
+    char const* pathCString = pathPart.c_str();
+    char const* pos0 = pathCString;
     for (std::string::size_type pos = 0; *pos0; ++pos) {
       if (*pos0 == '.') {
         pathPart[pos] = '/';
@@ -2086,12 +2086,12 @@ void SystemTools::ConvertToUnixSlashes(std::string& path)
     return;
   }
 
-  const char* pathCString = path.c_str();
+  char const* pathCString = path.c_str();
   bool hasDoubleSlash = false;
 #ifdef __VMS
   ConvertVMSToUnix(path);
 #else
-  const char* pos0 = pathCString;
+  char const* pos0 = pathCString;
   for (std::string::size_type pos = 0; *pos0; ++pos) {
     if (*pos0 == '\\') {
       path[pos] = '/';
@@ -2154,14 +2154,14 @@ void SystemTools::ConvertToUnixSlashes(std::string& path)
 
 #ifdef _WIN32
 std::wstring SystemTools::ConvertToWindowsExtendedPath(
-  const std::string& source)
+  std::string const& source)
 {
   return Encoding::ToWindowsExtendedPath(source);
 }
 #endif
 
 // change // to /, and escape any spaces in the path
-std::string SystemTools::ConvertToUnixOutputPath(const std::string& path)
+std::string SystemTools::ConvertToUnixOutputPath(std::string const& path)
 {
   std::string ret = path;
 
@@ -2174,7 +2174,7 @@ std::string SystemTools::ConvertToUnixOutputPath(const std::string& path)
   if (ret.find_first_of(' ') != std::string::npos) {
     std::string result;
     char lastch = 1;
-    for (const char* ch = ret.c_str(); *ch != '\0'; ++ch) {
+    for (char const* ch = ret.c_str(); *ch != '\0'; ++ch) {
       // if it is already escaped then don't try to escape it again
       if ((*ch == ' ') && lastch != '\\') {
         result += '\\';
@@ -2187,7 +2187,7 @@ std::string SystemTools::ConvertToUnixOutputPath(const std::string& path)
   return ret;
 }
 
-std::string SystemTools::ConvertToOutputPath(const std::string& path)
+std::string SystemTools::ConvertToOutputPath(std::string const& path)
 {
 #if defined(_WIN32) && !defined(__CYGWIN__)
   return SystemTools::ConvertToWindowsOutputPath(path);
@@ -2197,7 +2197,7 @@ std::string SystemTools::ConvertToOutputPath(const std::string& path)
 }
 
 // remove double slashes not at the start
-std::string SystemTools::ConvertToWindowsOutputPath(const std::string& path)
+std::string SystemTools::ConvertToWindowsOutputPath(std::string const& path)
 {
   std::string ret;
   // make it big enough for all of path and double quotes
@@ -2240,7 +2240,7 @@ std::string SystemTools::ConvertToWindowsOutputPath(const std::string& path)
 /**
  * Append the filename from the path source to the directory name dir.
  */
-static std::string FileInDir(const std::string& source, const std::string& dir)
+static std::string FileInDir(std::string const& source, std::string const& dir)
 {
   std::string new_destination = dir;
   SystemTools::ConvertToUnixSlashes(new_destination);
@@ -2253,7 +2253,7 @@ SystemTools::CopyStatus SystemTools::CopyFileIfDifferent(
   // special check for a destination that is a directory
   // FilesDiffer does not handle file to directory compare
   if (SystemTools::FileIsDirectory(destination)) {
-    const std::string new_destination = FileInDir(source, destination);
+    std::string const new_destination = FileInDir(source, destination);
     if (!SystemTools::ComparePath(new_destination, destination)) {
       return SystemTools::CopyFileIfDifferent(source, new_destination);
     }
@@ -2270,8 +2270,8 @@ SystemTools::CopyStatus SystemTools::CopyFileIfDifferent(
 
 #define KWSYS_ST_BUFFER 4096
 
-bool SystemTools::FilesDiffer(const std::string& source,
-                              const std::string& destination)
+bool SystemTools::FilesDiffer(std::string const& source,
+                              std::string const& destination)
 {
 
 #if defined(_WIN32)
@@ -2351,8 +2351,8 @@ bool SystemTools::FilesDiffer(const std::string& source,
     }
 
     // If this block differs the file differs.
-    if (memcmp(static_cast<const void*>(source_buf),
-               static_cast<const void*>(dest_buf),
+    if (memcmp(static_cast<void const*>(source_buf),
+               static_cast<void const*>(dest_buf),
                static_cast<size_t>(nnext)) != 0) {
       return true;
     }
@@ -2365,8 +2365,8 @@ bool SystemTools::FilesDiffer(const std::string& source,
   return false;
 }
 
-bool SystemTools::TextFilesDiffer(const std::string& path1,
-                                  const std::string& path2)
+bool SystemTools::TextFilesDiffer(std::string const& path1,
+                                  std::string const& path2)
 {
   kwsys::ifstream if1(path1.c_str());
   kwsys::ifstream if2(path2.c_str());
@@ -2418,7 +2418,7 @@ SystemTools::CopyStatus SystemTools::CopyFileContentBlockwise(
   // before using the data, but the fin.gcount() will be zero if an
   // error occurred.  Therefore, the loop should be safe everywhere.
   while (fin) {
-    const int bufferSize = 4096;
+    int const bufferSize = 4096;
     char buffer[bufferSize];
 
     fin.read(buffer, bufferSize);
@@ -2660,7 +2660,7 @@ Status SystemTools::CopyADirectory(std::string const& source,
 }
 
 // return size of file; also returns zero if no file exists
-unsigned long SystemTools::FileLength(const std::string& filename)
+unsigned long SystemTools::FileLength(std::string const& filename)
 {
   unsigned long length = 0;
 #ifdef _WIN32
@@ -2683,7 +2683,7 @@ unsigned long SystemTools::FileLength(const std::string& filename)
   return length;
 }
 
-int SystemTools::Strucmp(const char* l, const char* r)
+int SystemTools::Strucmp(char const* l, char const* r)
 {
   int lc;
   int rc;
@@ -2695,7 +2695,7 @@ int SystemTools::Strucmp(const char* l, const char* r)
 }
 
 // return file's modified time
-long int SystemTools::ModifiedTime(const std::string& filename)
+long int SystemTools::ModifiedTime(std::string const& filename)
 {
   long int mt = 0;
 #ifdef _WIN32
@@ -2714,7 +2714,7 @@ long int SystemTools::ModifiedTime(const std::string& filename)
 }
 
 // return file's creation time
-long int SystemTools::CreationTime(const std::string& filename)
+long int SystemTools::CreationTime(std::string const& filename)
 {
   long int ct = 0;
 #ifdef _WIN32
@@ -2846,7 +2846,7 @@ size_t SystemTools::GetMaximumFilePathLength()
  * found.  Otherwise, the empty string is returned.
  */
 std::string SystemToolsStatic::FindName(
-  const std::string& name, const std::vector<std::string>& userPaths,
+  std::string const& name, std::vector<std::string> const& userPaths,
   bool no_system_path)
 {
   // Add the system search path to our path first
@@ -2878,8 +2878,8 @@ std::string SystemToolsStatic::FindName(
  * the system search path.  Returns the full path to the file if it is
  * found.  Otherwise, the empty string is returned.
  */
-std::string SystemTools::FindFile(const std::string& name,
-                                  const std::vector<std::string>& userPaths,
+std::string SystemTools::FindFile(std::string const& name,
+                                  std::vector<std::string> const& userPaths,
                                   bool no_system_path)
 {
   std::string tryPath =
@@ -2897,7 +2897,7 @@ std::string SystemTools::FindFile(const std::string& name,
  * found.  Otherwise, the empty string is returned.
  */
 std::string SystemTools::FindDirectory(
-  const std::string& name, const std::vector<std::string>& userPaths,
+  std::string const& name, std::vector<std::string> const& userPaths,
   bool no_system_path)
 {
   std::string tryPath =
@@ -2914,8 +2914,8 @@ std::string SystemTools::FindDirectory(
  * the system search path.  Returns the full path to the executable if it is
  * found.  Otherwise, the empty string is returned.
  */
-std::string SystemTools::FindProgram(const char* nameIn,
-                                     const std::vector<std::string>& userPaths,
+std::string SystemTools::FindProgram(char const* nameIn,
+                                     std::vector<std::string> const& userPaths,
                                      bool no_system_path)
 {
   if (!nameIn || !*nameIn) {
@@ -2925,8 +2925,8 @@ std::string SystemTools::FindProgram(const char* nameIn,
                                   no_system_path);
 }
 
-std::string SystemTools::FindProgram(const std::string& name,
-                                     const std::vector<std::string>& userPaths,
+std::string SystemTools::FindProgram(std::string const& name,
+                                     std::vector<std::string> const& userPaths,
                                      bool no_system_path)
 {
 #if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
@@ -2996,8 +2996,8 @@ std::string SystemTools::FindProgram(const std::string& name,
   return "";
 }
 
-std::string SystemTools::FindProgram(const std::vector<std::string>& names,
-                                     const std::vector<std::string>& path,
+std::string SystemTools::FindProgram(std::vector<std::string> const& names,
+                                     std::vector<std::string> const& path,
                                      bool noSystemPath)
 {
   for (std::string const& name : names) {
@@ -3015,8 +3015,8 @@ std::string SystemTools::FindProgram(const std::vector<std::string>& names,
  * the system search path.  Returns the full path to the library if it is
  * found.  Otherwise, the empty string is returned.
  */
-std::string SystemTools::FindLibrary(const std::string& name,
-                                     const std::vector<std::string>& userPaths)
+std::string SystemTools::FindLibrary(std::string const& name,
+                                     std::vector<std::string> const& userPaths)
 {
   // See if the executable exists as written.
   if (SystemTools::FileExists(name, true)) {
@@ -3095,7 +3095,7 @@ std::string SystemTools::FindLibrary(const std::string& name,
   return "";
 }
 
-std::string SystemTools::GetRealPath(const std::string& path,
+std::string SystemTools::GetRealPath(std::string const& path,
                                      std::string* errorMessage)
 {
   std::string ret;
@@ -3104,12 +3104,12 @@ std::string SystemTools::GetRealPath(const std::string& path,
 }
 
 // Remove any trailing slash from the name except in a root component.
-static const char* RemoveTrailingSlashes(
-  const std::string& inName, char (&local_buffer)[KWSYS_SYSTEMTOOLS_MAXPATH],
+static char const* RemoveTrailingSlashes(
+  std::string const& inName, char (&local_buffer)[KWSYS_SYSTEMTOOLS_MAXPATH],
   std::string& string_buffer)
 {
   size_t length = inName.size();
-  const char* name = inName.c_str();
+  char const* name = inName.c_str();
 
   size_t last = length - 1;
   if (last > 0 && (name[last] == '/' || name[last] == '\\') &&
@@ -3127,7 +3127,7 @@ static const char* RemoveTrailingSlashes(
   return name;
 }
 
-bool SystemTools::FileIsDirectory(const std::string& inName)
+bool SystemTools::FileIsDirectory(std::string const& inName)
 {
   if (inName.empty()) {
     return false;
@@ -3135,7 +3135,7 @@ bool SystemTools::FileIsDirectory(const std::string& inName)
 
   char local_buffer[KWSYS_SYSTEMTOOLS_MAXPATH];
   std::string string_buffer;
-  const auto name = RemoveTrailingSlashes(inName, local_buffer, string_buffer);
+  auto const name = RemoveTrailingSlashes(inName, local_buffer, string_buffer);
 
 // Now check the file node type.
 #if defined(_WIN32)
@@ -3150,13 +3150,13 @@ bool SystemTools::FileIsDirectory(const std::string& inName)
 #endif
 }
 
-bool SystemTools::FileIsExecutable(const std::string& inName)
+bool SystemTools::FileIsExecutable(std::string const& inName)
 {
 #ifdef _WIN32
   char local_buffer[KWSYS_SYSTEMTOOLS_MAXPATH];
   std::string string_buffer;
-  const auto name = RemoveTrailingSlashes(inName, local_buffer, string_buffer);
-  const auto attr =
+  auto const name = RemoveTrailingSlashes(inName, local_buffer, string_buffer);
+  auto const attr =
     GetFileAttributesW(Encoding::ToWindowsExtendedPath(name).c_str());
 
   // On Windows any file that exists and is not a directory is considered
@@ -3168,7 +3168,7 @@ bool SystemTools::FileIsExecutable(const std::string& inName)
 }
 
 #if defined(_WIN32)
-bool SystemTools::FileIsSymlinkWithAttr(const std::wstring& path,
+bool SystemTools::FileIsSymlinkWithAttr(std::wstring const& path,
                                         unsigned long attr)
 {
   if (attr != INVALID_FILE_ATTRIBUTES) {
@@ -3205,7 +3205,7 @@ bool SystemTools::FileIsSymlinkWithAttr(const std::wstring& path,
 }
 #endif
 
-bool SystemTools::FileIsSymlink(const std::string& name)
+bool SystemTools::FileIsSymlink(std::string const& name)
 {
 #if defined(_WIN32)
   std::wstring path = Encoding::ToWindowsExtendedPath(name);
@@ -3216,7 +3216,7 @@ bool SystemTools::FileIsSymlink(const std::string& name)
 #endif
 }
 
-bool SystemTools::FileIsFIFO(const std::string& name)
+bool SystemTools::FileIsFIFO(std::string const& name)
 {
 #if defined(_WIN32)
   HANDLE hFile =
@@ -3359,7 +3359,7 @@ Status SystemTools::ChangeDirectory(std::string const& dir)
 std::string SystemTools::GetCurrentWorkingDirectory()
 {
   char buf[2048];
-  const char* cwd = Getcwd(buf, 2048);
+  char const* cwd = Getcwd(buf, 2048);
   std::string path;
   if (cwd) {
     path = cwd;
@@ -3368,14 +3368,14 @@ std::string SystemTools::GetCurrentWorkingDirectory()
   return path;
 }
 
-std::string SystemTools::GetProgramPath(const std::string& in_name)
+std::string SystemTools::GetProgramPath(std::string const& in_name)
 {
   std::string dir, file;
   SystemTools::SplitProgramPath(in_name, dir, file);
   return dir;
 }
 
-bool SystemTools::SplitProgramPath(const std::string& in_name,
+bool SystemTools::SplitProgramPath(std::string const& in_name,
                                    std::string& dir, std::string& file, bool)
 {
   dir = in_name;
@@ -3401,7 +3401,7 @@ bool SystemTools::SplitProgramPath(const std::string& in_name,
   return true;
 }
 
-bool SystemTools::FindProgramPath(const char* argv0, std::string& pathOut,
+bool SystemTools::FindProgramPath(char const* argv0, std::string& pathOut,
                                   std::string& errorMsg)
 {
   std::vector<std::string> failures;
@@ -3433,8 +3433,8 @@ static void SystemToolsAppendComponents(
   std::vector<std::string>::iterator first,
   std::vector<std::string>::iterator last)
 {
-  static const std::string up = "..";
-  static const std::string cur = ".";
+  static std::string const up = "..";
+  static std::string const cur = ".";
   for (std::vector<std::string>::const_iterator i = first; i != last; ++i) {
     if (*i == up) {
       // Remove the previous component if possible.  Ignore ../ components
@@ -3504,7 +3504,7 @@ std::string SystemTools::CollapseFullPath(std::string const& in_path)
 }
 
 std::string SystemTools::CollapseFullPath(std::string const& in_path,
-                                          const char* in_base)
+                                          char const* in_base)
 {
   if (!in_base) {
     return CollapseFullPathImpl(in_path, nullptr);
@@ -3520,8 +3520,8 @@ std::string SystemTools::CollapseFullPath(std::string const& in_path,
 }
 
 // compute the relative path from here to there
-std::string SystemTools::RelativePath(const std::string& local,
-                                      const std::string& remote)
+std::string SystemTools::RelativePath(std::string const& local,
+                                      std::string const& remote)
 {
   if (!SystemTools::FileIsFullPath(local)) {
     return "";
@@ -3596,7 +3596,7 @@ std::string SystemTools::RelativePath(const std::string& local,
   return relativePath;
 }
 
-std::string SystemTools::GetActualCaseForPath(const std::string& p)
+std::string SystemTools::GetActualCaseForPath(std::string const& p)
 {
 #ifdef _WIN32
   return SystemToolsStatic::GetCasePathName(p);
@@ -3605,11 +3605,11 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p)
 #endif
 }
 
-const char* SystemTools::SplitPathRootComponent(const std::string& p,
+char const* SystemTools::SplitPathRootComponent(std::string const& p,
                                                 std::string* root)
 {
   // Identify the root component.
-  const char* c = p.c_str();
+  char const* c = p.c_str();
   if ((c[0] == '/' && c[1] == '/') || (c[0] == '\\' && c[1] == '\\')) {
     // Network path.
     if (root) {
@@ -3671,11 +3671,11 @@ const char* SystemTools::SplitPathRootComponent(const std::string& p,
   return c;
 }
 
-void SystemTools::SplitPath(const std::string& p,
+void SystemTools::SplitPath(std::string const& p,
                             std::vector<std::string>& components,
                             bool expand_home_dir)
 {
-  const char* c;
+  char const* c;
   components.clear();
 
   // Identify the root component.
@@ -3711,8 +3711,8 @@ void SystemTools::SplitPath(const std::string& p,
   }
 
   // Parse the remaining components.
-  const char* first = c;
-  const char* last = first;
+  char const* first = c;
+  char const* last = first;
   for (; *last; ++last) {
     if (*last == '/' || *last == '\\') {
       // End of a component.  Save it.
@@ -3727,7 +3727,7 @@ void SystemTools::SplitPath(const std::string& p,
   }
 }
 
-std::string SystemTools::JoinPath(const std::vector<std::string>& components)
+std::string SystemTools::JoinPath(std::vector<std::string> const& components)
 {
   return SystemTools::JoinPath(components.begin(), components.end());
 }
@@ -3762,7 +3762,7 @@ std::string SystemTools::JoinPath(
   return result;
 }
 
-bool SystemTools::ComparePath(const std::string& c1, const std::string& c2)
+bool SystemTools::ComparePath(std::string const& c1, std::string const& c2)
 {
 #if defined(_WIN32) || defined(__APPLE__)
 #  ifdef _MSC_VER
@@ -3777,7 +3777,7 @@ bool SystemTools::ComparePath(const std::string& c1, const std::string& c2)
 #endif
 }
 
-bool SystemTools::Split(const std::string& str,
+bool SystemTools::Split(std::string const& str,
                         std::vector<std::string>& lines, char separator)
 {
   std::string data(str);
@@ -3797,7 +3797,7 @@ bool SystemTools::Split(const std::string& str,
   return true;
 }
 
-bool SystemTools::Split(const std::string& str,
+bool SystemTools::Split(std::string const& str,
                         std::vector<std::string>& lines)
 {
   std::string data(str);
@@ -3821,8 +3821,8 @@ bool SystemTools::Split(const std::string& str,
   return true;
 }
 
-std::string SystemTools::Join(const std::vector<std::string>& list,
-                              const std::string& separator)
+std::string SystemTools::Join(std::vector<std::string> const& list,
+                              std::string const& separator)
 {
   std::string result;
   if (list.empty()) {
@@ -3830,13 +3830,13 @@ std::string SystemTools::Join(const std::vector<std::string>& list,
   }
 
   size_t total_size = separator.size() * (list.size() - 1);
-  for (const std::string& string : list) {
+  for (std::string const& string : list) {
     total_size += string.size();
   }
 
   result.reserve(total_size);
   bool needs_separator = false;
-  for (const std::string& string : list) {
+  for (std::string const& string : list) {
     if (needs_separator) {
       result += separator;
     }
@@ -3851,7 +3851,7 @@ std::string SystemTools::Join(const std::vector<std::string>& list,
  * Return path of a full filename (no trailing slashes).
  * Warning: returned path is converted to Unix slashes format.
  */
-std::string SystemTools::GetFilenamePath(const std::string& filename)
+std::string SystemTools::GetFilenamePath(std::string const& filename)
 {
   std::string fn = filename;
   SystemTools::ConvertToUnixSlashes(fn);
@@ -3875,10 +3875,10 @@ std::string SystemTools::GetFilenamePath(const std::string& filename)
 /**
  * Return file name of a full filename (i.e. file name without path).
  */
-std::string SystemTools::GetFilenameName(const std::string& filename)
+std::string SystemTools::GetFilenameName(std::string const& filename)
 {
 #if defined(_WIN32) || defined(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
-  const char* separators = "/\\";
+  char const* separators = "/\\";
 #else
   char separators = '/';
 #endif
@@ -3894,7 +3894,7 @@ std::string SystemTools::GetFilenameName(const std::string& filename)
  * Return file extension of a full filename (dot included).
  * Warning: this is the longest extension (for example: .tar.gz)
  */
-std::string SystemTools::GetFilenameExtension(const std::string& filename)
+std::string SystemTools::GetFilenameExtension(std::string const& filename)
 {
   std::string name = SystemTools::GetFilenameName(filename);
   std::string::size_type dot_pos = name.find('.');
@@ -3910,7 +3910,7 @@ std::string SystemTools::GetFilenameExtension(const std::string& filename)
  * Return file extension of a full filename (dot included).
  * Warning: this is the shortest extension (for example: .gz of .tar.gz)
  */
-std::string SystemTools::GetFilenameLastExtension(const std::string& filename)
+std::string SystemTools::GetFilenameLastExtension(std::string const& filename)
 {
   std::string name = SystemTools::GetFilenameName(filename);
   std::string::size_type dot_pos = name.rfind('.');
@@ -3927,7 +3927,7 @@ std::string SystemTools::GetFilenameLastExtension(const std::string& filename)
  * Warning: it considers the longest extension (for example: .tar.gz)
  */
 std::string SystemTools::GetFilenameWithoutExtension(
-  const std::string& filename)
+  std::string const& filename)
 {
   std::string name = SystemTools::GetFilenameName(filename);
   std::string::size_type dot_pos = name.find('.');
@@ -3943,7 +3943,7 @@ std::string SystemTools::GetFilenameWithoutExtension(
  * from .tar.gz)
  */
 std::string SystemTools::GetFilenameWithoutLastExtension(
-  const std::string& filename)
+  std::string const& filename)
 {
   std::string name = SystemTools::GetFilenameName(filename);
   std::string::size_type dot_pos = name.rfind('.');
@@ -3953,7 +3953,7 @@ std::string SystemTools::GetFilenameWithoutLastExtension(
   return name;
 }
 
-bool SystemTools::FileHasSignature(const char* filename, const char* signature,
+bool SystemTools::FileHasSignature(char const* filename, char const* signature,
                                    long offset)
 {
   if (!filename || !signature) {
@@ -3981,7 +3981,7 @@ bool SystemTools::FileHasSignature(const char* filename, const char* signature,
   return res;
 }
 
-SystemTools::FileTypeEnum SystemTools::DetectFileType(const char* filename,
+SystemTools::FileTypeEnum SystemTools::DetectFileType(char const* filename,
                                                       unsigned long length,
                                                       double percent_bin)
 {
@@ -4012,8 +4012,8 @@ SystemTools::FileTypeEnum SystemTools::DetectFileType(const char* filename,
 
   size_t text_count = 0;
 
-  const unsigned char* ptr = buffer;
-  const unsigned char* buffer_end = buffer + read_length;
+  unsigned char const* ptr = buffer;
+  unsigned char const* buffer_end = buffer + read_length;
 
   while (ptr != buffer_end) {
     if ((*ptr >= 0x20 && *ptr <= 0x7F) || *ptr == '\n' || *ptr == '\r' ||
@@ -4035,7 +4035,7 @@ SystemTools::FileTypeEnum SystemTools::DetectFileType(const char* filename,
   return SystemTools::FileTypeText;
 }
 
-bool SystemTools::LocateFileInDir(const char* filename, const char* dir,
+bool SystemTools::LocateFileInDir(char const* filename, char const* dir,
                                   std::string& filename_found,
                                   int try_filename_dirs)
 {
@@ -4121,18 +4121,18 @@ bool SystemTools::LocateFileInDir(const char* filename, const char* dir,
   return res;
 }
 
-bool SystemTools::FileIsFullPath(const std::string& in_name)
+bool SystemTools::FileIsFullPath(std::string const& in_name)
 {
   return SystemToolsStatic::FileIsFullPath(in_name.c_str(), in_name.size());
 }
 
-bool SystemTools::FileIsFullPath(const char* in_name)
+bool SystemTools::FileIsFullPath(char const* in_name)
 {
   return SystemToolsStatic::FileIsFullPath(
     in_name, in_name[0] ? (in_name[1] ? 2 : 1) : 0);
 }
 
-bool SystemToolsStatic::FileIsFullPath(const char* in_name, size_t len)
+bool SystemToolsStatic::FileIsFullPath(char const* in_name, size_t len)
 {
 #if defined(_WIN32) && !defined(__CYGWIN__)
   // On Windows, the name must be at least two characters long.
@@ -4197,7 +4197,7 @@ Status SystemTools::GetShortPath(std::string const& path,
 #endif
 }
 
-std::string SystemTools::GetCurrentDateTime(const char* format)
+std::string SystemTools::GetCurrentDateTime(char const* format)
 {
   char buf[1024];
   time_t t;
@@ -4206,7 +4206,7 @@ std::string SystemTools::GetCurrentDateTime(const char* format)
   return std::string(buf);
 }
 
-std::string SystemTools::MakeCidentifier(const std::string& s)
+std::string SystemTools::MakeCidentifier(std::string const& s)
 {
   std::string str(s);
   if (str.find_first_of("0123456789") == 0) {
@@ -4294,7 +4294,7 @@ int SystemTools::GetTerminalWidth()
   return width;
 }
 
-Status SystemTools::GetPermissions(const char* file, mode_t& mode)
+Status SystemTools::GetPermissions(char const* file, mode_t& mode)
 {
   if (!file) {
     return Status::POSIX(EINVAL);
@@ -4322,7 +4322,7 @@ Status SystemTools::GetPermissions(std::string const& file, mode_t& mode)
     mode |= S_IFREG;
   }
   size_t dotPos = file.rfind('.');
-  const char* ext = dotPos == std::string::npos ? 0 : (file.c_str() + dotPos);
+  char const* ext = dotPos == std::string::npos ? 0 : (file.c_str() + dotPos);
   if (ext &&
       (Strucmp(ext, ".exe") == 0 || Strucmp(ext, ".com") == 0 ||
        Strucmp(ext, ".cmd") == 0 || Strucmp(ext, ".bat") == 0)) {
@@ -4338,7 +4338,7 @@ Status SystemTools::GetPermissions(std::string const& file, mode_t& mode)
   return Status::Success();
 }
 
-Status SystemTools::SetPermissions(const char* file, mode_t mode,
+Status SystemTools::SetPermissions(char const* file, mode_t mode,
                                    bool honor_umask)
 {
   if (!file) {
@@ -4370,13 +4370,13 @@ Status SystemTools::SetPermissions(std::string const& file, mode_t mode,
   return Status::Success();
 }
 
-std::string SystemTools::GetParentDirectory(const std::string& fileOrDir)
+std::string SystemTools::GetParentDirectory(std::string const& fileOrDir)
 {
   return SystemTools::GetFilenamePath(fileOrDir);
 }
 
-bool SystemTools::IsSubDirectory(const std::string& cSubdir,
-                                 const std::string& cDir)
+bool SystemTools::IsSubDirectory(std::string const& cSubdir,
+                                 std::string const& cDir)
 {
   if (cDir.empty()) {
     return false;
@@ -4688,7 +4688,7 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
   return res;
 }
 
-bool SystemTools::ParseURLProtocol(const std::string& URL,
+bool SystemTools::ParseURLProtocol(std::string const& URL,
                                    std::string& protocol,
                                    std::string& dataglom, bool decode)
 {
@@ -4710,7 +4710,7 @@ bool SystemTools::ParseURLProtocol(const std::string& URL,
   return true;
 }
 
-bool SystemTools::ParseURL(const std::string& URL, std::string& protocol,
+bool SystemTools::ParseURL(std::string const& URL, std::string& protocol,
                            std::string& username, std::string& password,
                            std::string& hostname, std::string& dataport,
                            std::string& database, bool decode)
@@ -4749,7 +4749,7 @@ bool SystemTools::ParseURL(const std::string& URL, std::string& protocol,
 }
 
 // ----------------------------------------------------------------------
-std::string SystemTools::DecodeURL(const std::string& url)
+std::string SystemTools::DecodeURL(std::string const& url)
 {
   kwsys::RegularExpression urlByteRe(VTK_URL_BYTE_REGEX);
   std::string ret;
diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in
index 03fa3bced072574eb5360ecbff9dbccedf8b0da7..c47888e1184b07bc5398beb2be3a81b5ec6b19b6 100644
--- a/SystemTools.hxx.in
+++ b/SystemTools.hxx.in
@@ -54,8 +54,8 @@ public:
   SystemToolsManager();
   ~SystemToolsManager();
 
-  SystemToolsManager(const SystemToolsManager&) = delete;
-  SystemToolsManager& operator=(const SystemToolsManager&) = delete;
+  SystemToolsManager(SystemToolsManager const&) = delete;
+  SystemToolsManager& operator=(SystemToolsManager const&) = delete;
 };
 
 // This instance will show up in any translation unit that uses
@@ -69,16 +69,16 @@ static SystemToolsManager SystemToolsManagerInstance;
 typedef int TestFilePermissions;
 #if defined(_WIN32) && !defined(__CYGWIN__)
 // On Windows (VC), no system header defines these constants...
-static const TestFilePermissions TEST_FILE_OK = 0;
-static const TestFilePermissions TEST_FILE_READ = 4;
-static const TestFilePermissions TEST_FILE_WRITE = 2;
-static const TestFilePermissions TEST_FILE_EXECUTE = 1;
+static TestFilePermissions const TEST_FILE_OK = 0;
+static TestFilePermissions const TEST_FILE_READ = 4;
+static TestFilePermissions const TEST_FILE_WRITE = 2;
+static TestFilePermissions const TEST_FILE_EXECUTE = 1;
 #else
 // Standard POSIX constants
-static const TestFilePermissions TEST_FILE_OK = F_OK;
-static const TestFilePermissions TEST_FILE_READ = R_OK;
-static const TestFilePermissions TEST_FILE_WRITE = W_OK;
-static const TestFilePermissions TEST_FILE_EXECUTE = X_OK;
+static TestFilePermissions const TEST_FILE_OK = F_OK;
+static TestFilePermissions const TEST_FILE_READ = R_OK;
+static TestFilePermissions const TEST_FILE_WRITE = W_OK;
+static TestFilePermissions const TEST_FILE_EXECUTE = X_OK;
 #endif
 
 /** \class SystemTools
@@ -99,9 +99,9 @@ public:
    * then an underscore is prepended.  Note that this can produce
    * identifiers that the standard reserves (_[A-Z].* and __.*).
    */
-  static std::string MakeCidentifier(const std::string& s);
+  static std::string MakeCidentifier(std::string const& s);
 
-  static std::string MakeCindentifier(const std::string& s)
+  static std::string MakeCindentifier(std::string const& s)
   {
     return MakeCidentifier(s);
   }
@@ -109,123 +109,123 @@ public:
   /**
    * Replace replace all occurrences of the string in the source string.
    */
-  static void ReplaceString(std::string& source, const char* replace,
-                            const char* with);
-  static void ReplaceString(std::string& source, const std::string& replace,
-                            const std::string& with);
+  static void ReplaceString(std::string& source, char const* replace,
+                            char const* with);
+  static void ReplaceString(std::string& source, std::string const& replace,
+                            std::string const& with);
 
   /**
    * Return a capitalized string (i.e the first letter is uppercased,
    * all other are lowercased).
    */
-  static std::string Capitalized(const std::string&);
+  static std::string Capitalized(std::string const&);
 
   /**
    * Return a 'capitalized words' string (i.e the first letter of each word
    * is uppercased all other are left untouched though).
    */
-  static std::string CapitalizedWords(const std::string&);
+  static std::string CapitalizedWords(std::string const&);
 
   /**
    * Return a 'uncapitalized words' string (i.e the first letter of each word
    * is lowercased all other are left untouched though).
    */
-  static std::string UnCapitalizedWords(const std::string&);
+  static std::string UnCapitalizedWords(std::string const&);
 
   /**
    * Return a lower case string
    */
-  static std::string LowerCase(const std::string&);
+  static std::string LowerCase(std::string const&);
 
   /**
    * Return a lower case string
    */
-  static std::string UpperCase(const std::string&);
+  static std::string UpperCase(std::string const&);
 
   /**
    * Count char in string
    */
-  static size_t CountChar(const char* str, char c);
+  static size_t CountChar(char const* str, char c);
 
   /**
    * Remove some characters from a string.
    * Return a pointer to the new resulting string (allocated with 'new')
    */
-  static char* RemoveChars(const char* str, const char* toremove);
+  static char* RemoveChars(char const* str, char const* toremove);
 
   /**
    * Remove remove all but 0->9, A->F characters from a string.
    * Return a pointer to the new resulting string (allocated with 'new')
    */
-  static char* RemoveCharsButUpperHex(const char* str);
+  static char* RemoveCharsButUpperHex(char const* str);
 
   /**
    * Replace some characters by another character in a string (in-place)
    * Return a pointer to string
    */
-  static char* ReplaceChars(char* str, const char* toreplace,
+  static char* ReplaceChars(char* str, char const* toreplace,
                             char replacement);
 
   /**
    * Returns true if str1 starts (respectively ends) with str2
    */
-  static bool StringStartsWith(const char* str1, const char* str2);
-  static bool StringStartsWith(const std::string& str1, const char* str2);
-  static bool StringEndsWith(const char* str1, const char* str2);
-  static bool StringEndsWith(const std::string& str1, const char* str2);
+  static bool StringStartsWith(char const* str1, char const* str2);
+  static bool StringStartsWith(std::string const& str1, char const* str2);
+  static bool StringEndsWith(char const* str1, char const* str2);
+  static bool StringEndsWith(std::string const& str1, char const* str2);
 
   /**
    * Returns a pointer to the last occurrence of str2 in str1
    */
-  static const char* FindLastString(const char* str1, const char* str2);
+  static char const* FindLastString(char const* str1, char const* str2);
 
   /**
    * Make a duplicate of the string similar to the strdup C function
    * but use new to create the 'new' string, so one can use
    * 'delete' to remove it. Returns 0 if the input is empty.
    */
-  static char* DuplicateString(const char* str);
+  static char* DuplicateString(char const* str);
 
   /**
    * Return the string cropped to a given length by removing chars in the
    * center of the string and replacing them with an ellipsis (...)
    */
-  static std::string CropString(const std::string&, size_t max_len);
+  static std::string CropString(std::string const&, size_t max_len);
 
   /** split a path by separator into an array of strings, default is /.
       If isPath is true then the string is treated like a path and if
       s starts with a / then the first element of the returned array will
       be /, so /foo/bar will be [/, foo, bar]
   */
-  static std::vector<std::string> SplitString(const std::string& s,
+  static std::vector<std::string> SplitString(std::string const& s,
                                               char separator = '/',
                                               bool isPath = false);
   /**
    * Perform a case-independent string comparison
    */
-  static int Strucmp(const char* s1, const char* s2);
+  static int Strucmp(char const* s1, char const* s2);
 
   /**
    * Split a string on its newlines into multiple lines
    * Return false only if the last line stored had no newline
    */
-  static bool Split(const std::string& s, std::vector<std::string>& l);
-  static bool Split(const std::string& s, std::vector<std::string>& l,
+  static bool Split(std::string const& s, std::vector<std::string>& l);
+  static bool Split(std::string const& s, std::vector<std::string>& l,
                     char separator);
 
   /**
    * Joins a vector of strings into a single string, with separator in between
    * each string.
    */
-  static std::string Join(const std::vector<std::string>& list,
-                          const std::string& separator);
+  static std::string Join(std::vector<std::string> const& list,
+                          std::string const& separator);
 
   /**
    * Return string with space added between capitalized words
    * (i.e. EatMyShorts becomes Eat My Shorts )
    * (note that IEatShorts becomes IEat Shorts)
    */
-  static std::string AddSpaceBetweenCapitalizedWords(const std::string&);
+  static std::string AddSpaceBetweenCapitalizedWords(std::string const&);
 
   /**
    * Append two or more strings and produce new one.
@@ -233,9 +233,9 @@ public:
    * with 'new'.
    * Return 0 if inputs are empty or there was an error
    */
-  static char* AppendStrings(const char* str1, const char* str2);
-  static char* AppendStrings(const char* str1, const char* str2,
-                             const char* str3);
+  static char* AppendStrings(char const* str1, char const* str2);
+  static char* AppendStrings(char const* str1, char const* str2,
+                             char const* str3);
 
   /**
    * Estimate the length of the string that will be produced
@@ -246,12 +246,12 @@ public:
    * you will not be able to use this 'ap' anymore from the beginning.
    * It's up to you to call va_end though.
    */
-  static int EstimateFormatLength(const char* format, va_list ap);
+  static int EstimateFormatLength(char const* format, va_list ap);
 
   /**
    * Escape specific characters in 'str'.
    */
-  static std::string EscapeChars(const char* str, const char* chars_to_escape,
+  static std::string EscapeChars(char const* str, char const* chars_to_escape,
                                  char escape_char = '\\');
 
   /** -----------------------------------------------------------------
@@ -266,20 +266,20 @@ public:
 
 #ifdef _WIN32
   /** Calls Encoding::ToWindowsExtendedPath.  */
-  static std::wstring ConvertToWindowsExtendedPath(const std::string&);
+  static std::wstring ConvertToWindowsExtendedPath(std::string const&);
 #endif
 
   /**
    * For windows this calls ConvertToWindowsOutputPath and for unix
    * it calls ConvertToUnixOutputPath
    */
-  static std::string ConvertToOutputPath(const std::string&);
+  static std::string ConvertToOutputPath(std::string const&);
 
   /**
    * Convert the path to a string that can be used in a unix makefile.
    * double slashes are removed, and spaces are escaped.
    */
-  static std::string ConvertToUnixOutputPath(const std::string&);
+  static std::string ConvertToUnixOutputPath(std::string const&);
 
   /**
    * Convert the path to string that can be used in a windows project or
@@ -287,12 +287,12 @@ public:
    * the string, the slashes are converted to windows style backslashes, and
    * if there are spaces in the string it is double quoted.
    */
-  static std::string ConvertToWindowsOutputPath(const std::string&);
+  static std::string ConvertToWindowsOutputPath(std::string const&);
 
   /**
    * Return true if a path with the given name exists in the current directory.
    */
-  static bool PathExists(const std::string& path);
+  static bool PathExists(std::string const& path);
 
   /**
    * Return true if a file exists in the current directory.
@@ -302,10 +302,10 @@ public:
    * also be checked for read access.  (Currently, this check
    * for read access is only done on POSIX systems.)
    */
-  static bool FileExists(const char* filename, bool isFile);
-  static bool FileExists(const std::string& filename, bool isFile);
-  static bool FileExists(const char* filename);
-  static bool FileExists(const std::string& filename);
+  static bool FileExists(char const* filename, bool isFile);
+  static bool FileExists(std::string const& filename, bool isFile);
+  static bool FileExists(char const* filename);
+  static bool FileExists(std::string const& filename);
 
   /**
    * Test if a file exists and can be accessed with the requested
@@ -317,9 +317,9 @@ public:
    * considered readable, and writable files are considered to
    * have the read-only file attribute cleared.
    */
-  static bool TestFileAccess(const char* filename,
+  static bool TestFileAccess(char const* filename,
                              TestFilePermissions permissions);
-  static bool TestFileAccess(const std::string& filename,
+  static bool TestFileAccess(std::string const& filename,
                              TestFilePermissions permissions);
 /**
  * Cross platform wrapper for stat struct
@@ -336,13 +336,13 @@ public:
    * On Windows this may not work for paths longer than 250 characters
    * due to limitations of the underlying '_wstat64' call.
    */
-  static int Stat(const char* path, Stat_t* buf);
-  static int Stat(const std::string& path, Stat_t* buf);
+  static int Stat(char const* path, Stat_t* buf);
+  static int Stat(std::string const& path, Stat_t* buf);
 
   /**
    * Return file length
    */
-  static unsigned long FileLength(const std::string& filename);
+  static unsigned long FileLength(std::string const& filename);
 
   /**
      Change the modification time or create a file
@@ -362,7 +362,7 @@ public:
    *  Get the file extension (including ".") needed for an executable
    *  on the current platform ("" for unix, ".exe" for Windows).
    */
-  static const char* GetExecutableExtension();
+  static char const* GetExecutableExtension();
 
   /**
    * Given a path on a Windows machine, return the actual case of
@@ -371,15 +371,15 @@ public:
    * returned unchanged.  Drive letters are always made upper case.
    * This does nothing on non-Windows systems but return the path.
    */
-  static std::string GetActualCaseForPath(const std::string& path);
+  static std::string GetActualCaseForPath(std::string const& path);
 
   /**
    * Given the path to a program executable, get the directory part of
    * the path with the file stripped off.  If there is no directory
    * part, the empty string is returned.
    */
-  static std::string GetProgramPath(const std::string&);
-  static bool SplitProgramPath(const std::string& in_name, std::string& dir,
+  static std::string GetProgramPath(std::string const&);
+  static bool SplitProgramPath(std::string const& in_name, std::string& dir,
                                std::string& file, bool errorReport = true);
 
   /**
@@ -394,7 +394,7 @@ public:
    *  buildDir is a possibly null path to the build directory.
    *  installPrefix is a possibly null pointer to the install directory.
    */
-  static bool FindProgramPath(const char* argv0, std::string& pathOut,
+  static bool FindProgramPath(char const* argv0, std::string& pathOut,
                               std::string& errorMsg);
 
   /**
@@ -405,7 +405,7 @@ public:
    */
   static std::string CollapseFullPath(std::string const& in_path);
   static std::string CollapseFullPath(std::string const& in_path,
-                                      const char* in_base);
+                                      char const* in_base);
   static std::string CollapseFullPath(std::string const& in_path,
                                       std::string const& in_base);
 
@@ -416,7 +416,7 @@ public:
    * nullptr.  Otherwise empty string is returned and errorMessage
    * contains error description.
    */
-  static std::string GetRealPath(const std::string& path,
+  static std::string GetRealPath(std::string const& path,
                                  std::string* errorMessage = nullptr);
 
   /**
@@ -434,7 +434,7 @@ public:
    * returned.  The root component is stored in the "root" string if
    * given.
    */
-  static const char* SplitPathRootComponent(const std::string& p,
+  static char const* SplitPathRootComponent(std::string const& p,
                                             std::string* root = nullptr);
 
   /**
@@ -451,7 +451,7 @@ public:
    * preserved, including empty ones.  Typically callers should use
    * this only on paths that have already been normalized.
    */
-  static void SplitPath(const std::string& p,
+  static void SplitPath(std::string const& p,
                         std::vector<std::string>& components,
                         bool expand_home_dir = true);
 
@@ -463,50 +463,50 @@ public:
    * preserved, including empty ones.  Typically callers should use
    * this only on paths that have already been normalized.
    */
-  static std::string JoinPath(const std::vector<std::string>& components);
+  static std::string JoinPath(std::vector<std::string> const& components);
   static std::string JoinPath(std::vector<std::string>::const_iterator first,
                               std::vector<std::string>::const_iterator last);
 
   /**
    * Compare a path or components of a path.
    */
-  static bool ComparePath(const std::string& c1, const std::string& c2);
+  static bool ComparePath(std::string const& c1, std::string const& c2);
 
   /**
    * Return path of a full filename (no trailing slashes)
    */
-  static std::string GetFilenamePath(const std::string&);
+  static std::string GetFilenamePath(std::string const&);
 
   /**
    * Return file name of a full filename (i.e. file name without path)
    */
-  static std::string GetFilenameName(const std::string&);
+  static std::string GetFilenameName(std::string const&);
 
   /**
    * Return longest file extension of a full filename (dot included)
    */
-  static std::string GetFilenameExtension(const std::string&);
+  static std::string GetFilenameExtension(std::string const&);
 
   /**
    * Return shortest file extension of a full filename (dot included)
    */
-  static std::string GetFilenameLastExtension(const std::string& filename);
+  static std::string GetFilenameLastExtension(std::string const& filename);
 
   /**
    * Return file name without extension of a full filename
    */
-  static std::string GetFilenameWithoutExtension(const std::string&);
+  static std::string GetFilenameWithoutExtension(std::string const&);
 
   /**
    * Return file name without its last (shortest) extension
    */
-  static std::string GetFilenameWithoutLastExtension(const std::string&);
+  static std::string GetFilenameWithoutLastExtension(std::string const&);
 
   /**
    * Return whether the path represents a full path (not relative)
    */
-  static bool FileIsFullPath(const std::string&);
-  static bool FileIsFullPath(const char*);
+  static bool FileIsFullPath(std::string const&);
+  static bool FileIsFullPath(char const*);
 
   /**
    * For windows return the short path for the given path,
@@ -527,13 +527,13 @@ public:
   /**
    * Get the parent directory of the directory or file
    */
-  static std::string GetParentDirectory(const std::string& fileOrDir);
+  static std::string GetParentDirectory(std::string const& fileOrDir);
 
   /**
    * Check if the given file or directory is in subdirectory of dir
    */
-  static bool IsSubDirectory(const std::string& fileOrDir,
-                             const std::string& dir);
+  static bool IsSubDirectory(std::string const& fileOrDir,
+                             std::string const& dir);
 
   /** -----------------------------------------------------------------
    *               File Manipulation Routines
@@ -544,7 +544,7 @@ public:
    * Open a file considering unicode. On Windows, if 'e' is present in
    * mode it is first discarded.
    */
-  static FILE* Fopen(const std::string& file, const char* mode);
+  static FILE* Fopen(std::string const& file, char const* mode);
 
 /**
  * Visual C++ does not define mode_t.
@@ -558,9 +558,9 @@ public:
    * can make a full path even if none of the directories existed
    * prior to calling this function.
    */
-  static Status MakeDirectory(const char* path, const mode_t* mode = nullptr);
+  static Status MakeDirectory(char const* path, mode_t const* mode = nullptr);
   static Status MakeDirectory(std::string const& path,
-                              const mode_t* mode = nullptr);
+                              mode_t const* mode = nullptr);
 
   /**
    * Represent the result of a file copy operation.
@@ -595,15 +595,15 @@ public:
   /**
    * Compare the contents of two files.  Return true if different
    */
-  static bool FilesDiffer(const std::string& source,
-                          const std::string& destination);
+  static bool FilesDiffer(std::string const& source,
+                          std::string const& destination);
 
   /**
    * Compare the contents of two files, ignoring line ending differences.
    * Return true if different
    */
-  static bool TextFilesDiffer(const std::string& path1,
-                              const std::string& path2);
+  static bool TextFilesDiffer(std::string const& path1,
+                              std::string const& path2);
 
   /**
    * Blockwise copy source to destination file
@@ -628,8 +628,8 @@ public:
     WindowsFileId(unsigned long volumeSerialNumber,
                   unsigned long fileIndexHigh, unsigned long fileIndexLow);
 
-    bool operator==(const WindowsFileId& o) const;
-    bool operator!=(const WindowsFileId& o) const;
+    bool operator==(WindowsFileId const& o) const;
+    bool operator!=(WindowsFileId const& o) const;
 
   private:
     unsigned long m_volumeSerialNumber;
@@ -645,8 +645,8 @@ public:
     UnixFileId(dev_t volumeSerialNumber, ino_t fileSerialNumber,
                off_t fileSize);
 
-    bool operator==(const UnixFileId& o) const;
-    bool operator!=(const UnixFileId& o) const;
+    bool operator==(UnixFileId const& o) const;
+    bool operator!=(UnixFileId const& o) const;
 
   private:
     dev_t m_volumeSerialNumber;
@@ -660,12 +660,12 @@ public:
    * Outputs a FileId for the given file or directory.
    * Returns true on success, false on failure
    */
-  static bool GetFileId(const std::string& file, FileId& id);
+  static bool GetFileId(std::string const& file, FileId& id);
 
   /**
    * Return true if the two files are the same file
    */
-  static bool SameFile(const std::string& file1, const std::string& file2);
+  static bool SameFile(std::string const& file1, std::string const& file2);
 
   /**
    * Copy a file.
@@ -711,49 +711,49 @@ public:
    * Find a file in the system PATH, with optional extra paths
    */
   static std::string FindFile(
-    const std::string& name,
-    const std::vector<std::string>& path = std::vector<std::string>(),
+    std::string const& name,
+    std::vector<std::string> const& path = std::vector<std::string>(),
     bool no_system_path = false);
 
   /**
    * Find a directory in the system PATH, with optional extra paths
    */
   static std::string FindDirectory(
-    const std::string& name,
-    const std::vector<std::string>& path = std::vector<std::string>(),
+    std::string const& name,
+    std::vector<std::string> const& path = std::vector<std::string>(),
     bool no_system_path = false);
 
   /**
    * Find an executable in the system PATH, with optional extra paths
    */
   static std::string FindProgram(
-    const char* name,
-    const std::vector<std::string>& path = std::vector<std::string>(),
+    char const* name,
+    std::vector<std::string> const& path = std::vector<std::string>(),
     bool no_system_path = false);
   static std::string FindProgram(
-    const std::string& name,
-    const std::vector<std::string>& path = std::vector<std::string>(),
+    std::string const& name,
+    std::vector<std::string> const& path = std::vector<std::string>(),
     bool no_system_path = false);
   static std::string FindProgram(
-    const std::vector<std::string>& names,
-    const std::vector<std::string>& path = std::vector<std::string>(),
+    std::vector<std::string> const& names,
+    std::vector<std::string> const& path = std::vector<std::string>(),
     bool no_system_path = false);
 
   /**
    * Find a library in the system PATH, with optional extra paths
    */
-  static std::string FindLibrary(const std::string& name,
-                                 const std::vector<std::string>& path);
+  static std::string FindLibrary(std::string const& name,
+                                 std::vector<std::string> const& path);
 
   /**
    * Return true if the file is a directory
    */
-  static bool FileIsDirectory(const std::string& name);
+  static bool FileIsDirectory(std::string const& name);
 
   /**
    * Return true if the file is an executable
    */
-  static bool FileIsExecutable(const std::string& name);
+  static bool FileIsExecutable(std::string const& name);
 
 #if defined(_WIN32)
   /**
@@ -761,24 +761,24 @@ public:
    * Only available on Windows. This avoids an expensive `GetFileAttributesW`
    * call.
    */
-  static bool FileIsSymlinkWithAttr(const std::wstring& path,
+  static bool FileIsSymlinkWithAttr(std::wstring const& path,
                                     unsigned long attr);
 #endif
 
   /**
    * Return true if the file is a symlink
    */
-  static bool FileIsSymlink(const std::string& name);
+  static bool FileIsSymlink(std::string const& name);
 
   /**
    * Return true if the file is a FIFO
    */
-  static bool FileIsFIFO(const std::string& name);
+  static bool FileIsFIFO(std::string const& name);
 
   /**
    * Return true if the file has a given signature (first set of bytes)
    */
-  static bool FileHasSignature(const char* filename, const char* signature,
+  static bool FileHasSignature(char const* filename, char const* signature,
                                long offset = 0);
 
   /**
@@ -796,7 +796,7 @@ public:
     FileTypeBinary,
     FileTypeText
   };
-  static SystemTools::FileTypeEnum DetectFileType(const char* filename,
+  static SystemTools::FileTypeEnum DetectFileType(char const* filename,
                                                   unsigned long length = 256,
                                                   double percent_bin = 0.05);
 
@@ -828,7 +828,7 @@ public:
    * etc.
    * Return true if the file was found, false otherwise.
    */
-  static bool LocateFileInDir(const char* filename, const char* dir,
+  static bool LocateFileInDir(char const* filename, char const* dir,
                               std::string& filename_found,
                               int try_filename_dirs = 0);
 
@@ -840,18 +840,18 @@ public:
       /a/b/c/d to /a/b/c1/d1 -> ../../c1/d1
       from /usr/src to /usr/src/test/blah/foo.cpp -> test/blah/foo.cpp
   */
-  static std::string RelativePath(const std::string& local,
-                                  const std::string& remote);
+  static std::string RelativePath(std::string const& local,
+                                  std::string const& remote);
 
   /**
    * Return file's modified time
    */
-  static long int ModifiedTime(const std::string& filename);
+  static long int ModifiedTime(std::string const& filename);
 
   /**
    * Return file's creation time (Win32: works only for NTFS, not FAT)
    */
-  static long int CreationTime(const std::string& filename);
+  static long int CreationTime(std::string const& filename);
 
   /**
    * Get and set permissions of the file.  If honor_umask is set, the umask
@@ -861,9 +861,9 @@ public:
    * WARNING:  A non-thread-safe method is currently used to get the umask
    * if a honor_umask parameter is set to true.
    */
-  static Status GetPermissions(const char* file, mode_t& mode);
+  static Status GetPermissions(char const* file, mode_t& mode);
   static Status GetPermissions(std::string const& file, mode_t& mode);
-  static Status SetPermissions(const char* file, mode_t mode,
+  static Status SetPermissions(char const* file, mode_t mode,
                                bool honor_umask = false);
   static Status SetPermissions(std::string const& file, mode_t mode,
                                bool honor_umask = false);
@@ -879,7 +879,7 @@ public:
   /**
    * Get current date/time
    */
-  static std::string GetCurrentDateTime(const char* format);
+  static std::string GetCurrentDateTime(char const* format);
 
   /** -----------------------------------------------------------------
    *               Registry Manipulation Routines
@@ -901,27 +901,27 @@ public:
   /**
    * Get a list of subkeys.
    */
-  static bool GetRegistrySubKeys(const std::string& key,
+  static bool GetRegistrySubKeys(std::string const& key,
                                  std::vector<std::string>& subkeys,
                                  KeyWOW64 view = KeyWOW64_Default);
 
   /**
    * Read a registry value
    */
-  static bool ReadRegistryValue(const std::string& key, std::string& value,
+  static bool ReadRegistryValue(std::string const& key, std::string& value,
                                 KeyWOW64 view = KeyWOW64_Default);
 
   /**
    * Write a registry value
    */
-  static bool WriteRegistryValue(const std::string& key,
-                                 const std::string& value,
+  static bool WriteRegistryValue(std::string const& key,
+                                 std::string const& value,
                                  KeyWOW64 view = KeyWOW64_Default);
 
   /**
    * Delete a registry value
    */
-  static bool DeleteRegistryValue(const std::string& key,
+  static bool DeleteRegistryValue(std::string const& key,
                                   KeyWOW64 view = KeyWOW64_Default);
 
   /** -----------------------------------------------------------------
@@ -935,25 +935,25 @@ public:
    *  of env will be used instead of PATH.
    */
   static void GetPath(std::vector<std::string>& path,
-                      const char* env = nullptr);
+                      char const* env = nullptr);
 
   /**
    * Read an environment variable
    */
-  static const char* GetEnv(const char* key);
-  static const char* GetEnv(const std::string& key);
-  static bool GetEnv(const char* key, std::string& result);
-  static bool GetEnv(const std::string& key, std::string& result);
-  static bool HasEnv(const char* key);
-  static bool HasEnv(const std::string& key);
+  static char const* GetEnv(char const* key);
+  static char const* GetEnv(std::string const& key);
+  static bool GetEnv(char const* key, std::string& result);
+  static bool GetEnv(std::string const& key, std::string& result);
+  static bool HasEnv(char const* key);
+  static bool HasEnv(std::string const& key);
 
   /** Put a string into the environment
       of the form var=value */
-  static bool PutEnv(const std::string& env);
+  static bool PutEnv(std::string const& env);
 
   /** Remove a string from the environment.
       Input is of the form "var" or "var=value" (value is ignored). */
-  static bool UnPutEnv(const std::string& env);
+  static bool UnPutEnv(std::string const& env);
 
   /**
    * Get current working directory CWD
@@ -1008,7 +1008,7 @@ public:
    * decode the dataglom using DecodeURL if set to true.
    * Return false if the URL does not have the required form, true otherwise.
    */
-  static bool ParseURLProtocol(const std::string& URL, std::string& protocol,
+  static bool ParseURLProtocol(std::string const& URL, std::string& protocol,
                                std::string& dataglom, bool decode = false);
 
   /**
@@ -1019,7 +1019,7 @@ public:
    * decode all string except the protocol using DecodeUrl if set to true.
    * Return true if the string matches the format; false otherwise.
    */
-  static bool ParseURL(const std::string& URL, std::string& protocol,
+  static bool ParseURL(std::string const& URL, std::string& protocol,
                        std::string& username, std::string& password,
                        std::string& hostname, std::string& dataport,
                        std::string& datapath, bool decode = false);
@@ -1030,7 +1030,7 @@ public:
    * Does not perform any other sort of validation.
    * Return the decoded string
    */
-  static std::string DecodeURL(const std::string& url);
+  static std::string DecodeURL(std::string const& url);
 
 private:
   static void ClassInitialize();
diff --git a/Terminal.c b/Terminal.c
index eb6e01b5ec2c7b440041f5bc0e065f37d5c7501e..2e62779092ae7cbc71b0e23af87d8eb2df3983d1 100644
--- a/Terminal.c
+++ b/Terminal.c
@@ -48,7 +48,7 @@ static void kwsysTerminalSetConsoleColor(HANDLE hOut,
                                          FILE* stream, int color);
 #endif
 
-void kwsysTerminal_cfprintf(int color, FILE* stream, const char* format, ...)
+void kwsysTerminal_cfprintf(int color, FILE* stream, char const* format, ...)
 {
   /* Setup the stream with the given color if possible.  */
   int pipeIsConsole = 0;
@@ -106,7 +106,7 @@ static int kwsysTerminalStreamIsNotInteractive(FILE* stream)
 #endif
 
 /* List of terminal names known to support VT100 color escape sequences.  */
-static const char* kwsysTerminalVT100Names[] = { "Eterm",
+static char const* kwsysTerminalVT100Names[] = { "Eterm",
                                                  "alacritty",
                                                  "alacritty-direct",
                                                  "ansi",
@@ -170,7 +170,7 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
 {
   /* Force color according to https://bixense.com/clicolors/ convention.  */
   {
-    const char* clicolor_force = getenv("CLICOLOR_FORCE");
+    char const* clicolor_force = getenv("CLICOLOR_FORCE");
     if (clicolor_force && *clicolor_force &&
         strcmp(clicolor_force, "0") != 0) {
       return 1;
@@ -179,7 +179,7 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
 
   /* Disable color according to https://bixense.com/clicolors/ convention. */
   {
-    const char* clicolor = getenv("CLICOLOR");
+    char const* clicolor = getenv("CLICOLOR");
     if (clicolor && strcmp(clicolor, "0") == 0) {
       return 0;
     }
@@ -187,7 +187,7 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
 
   /* GNU make 4.1+ may tell us that its output is destined for a TTY. */
   {
-    const char* termout = getenv("MAKE_TERMOUT");
+    char const* termout = getenv("MAKE_TERMOUT");
     if (termout && *termout != '\0') {
       return 1;
     }
@@ -197,7 +197,7 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
      seem to claim the TERM is xterm even though they do not support
      VT100 escapes.  */
   {
-    const char* emacs = getenv("EMACS");
+    char const* emacs = getenv("EMACS");
     if (emacs && *emacs == 't') {
       return 0;
     }
@@ -205,8 +205,8 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
 
   /* Check for a valid terminal.  */
   if (!default_vt100) {
-    const char** t = 0;
-    const char* term = getenv("TERM");
+    char const** t = 0;
+    char const* term = getenv("TERM");
     if (term) {
       for (t = kwsysTerminalVT100Names; *t && strcmp(term, *t) != 0; ++t) {
       }
diff --git a/Terminal.h.in b/Terminal.h.in
index 1a2c7452fa1e84906991eabb8fb1b5104ac951e9..ec8e31d3a9f3fbc954980a02cb79f96c3652043d 100644
--- a/Terminal.h.in
+++ b/Terminal.h.in
@@ -92,7 +92,7 @@ extern "C" {
  *   color specification.
  */
 kwsysEXPORT void kwsysTerminal_cfprintf(int color, FILE* stream,
-                                        const char* format, ...);
+                                        char const* format, ...);
 enum kwsysTerminal_Color_e
 {
   /* Normal Text */
diff --git a/clang-format.bash b/clang-format.bash
index 2561a895483e6f9dc7fb3ea8db304c09a335b035..167371f290d2e4e673ec1be2f37e6872fd4f282c 100755
--- a/clang-format.bash
+++ b/clang-format.bash
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #=============================================================================
-# Copyright 2015-2017 Kitware, Inc.
+# Copyright 2015-2025 Kitware, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@ test "$#" = 0 || die "$usage"
 
 # Find a default tool.
 tools='
-  clang-format-15
+  clang-format-18
   clang-format
 '
 if test "x$clang_format" = "x"; then
@@ -96,8 +96,8 @@ if ! type -p "$clang_format" >/dev/null; then
     exit 1
 fi
 
-if ! "$clang_format" --version | grep 'clang-format version 15' >/dev/null 2>/dev/null; then
-    echo "clang-format version 15 is required (exactly)"
+if ! "$clang_format" --version | grep 'clang-format version 18' >/dev/null 2>/dev/null; then
+    echo "clang-format version 18 is required (exactly)"
     exit 1
 fi
 
@@ -117,7 +117,7 @@ list_files() {
 
   # Select sources with our attribute.
   git check-attr --stdin format.clang-format |
-    sed -n '/: format\.clang-format: \(set\|15\)$/ {s/:[^:]*:[^:]*$//p}'
+    sed -n '/: format\.clang-format: \(set\|18\)$/ {s/:[^:]*:[^:]*$//p}'
 }
 
 # Transform configured sources to protect @SYMBOLS@.
diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx
index 0bfa20ee1d431bf13e6c3343df1207409829d748..07e6f6df680f2be169ac0a5cac87beca3dd28c28 100644
--- a/kwsysPlatformTestsCXX.cxx
+++ b/kwsysPlatformTestsCXX.cxx
@@ -147,7 +147,7 @@ int main()
   int status = 0;
   size_t bufferLen = 512;
   char buffer[512] = { '\0' };
-  const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
+  char const* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
diff --git a/testCommandLineArguments.cxx b/testCommandLineArguments.cxx
index 0786751592cd802e8bb6a1a5111dcbcb4bc1d690..880f7eb45ab76c9dbf0d8b71c69899ecb726d845 100644
--- a/testCommandLineArguments.cxx
+++ b/testCommandLineArguments.cxx
@@ -17,7 +17,7 @@
 
 static void* random_ptr = reinterpret_cast<void*>(0x123);
 
-static int argument(const char* arg, const char* value, void* call_data)
+static int argument(char const* arg, char const* value, void* call_data)
 {
   std::cout << "Got argument: \"" << arg << "\" value: \""
             << (value ? value : "(null)") << "\"" << std::endl;
@@ -28,7 +28,7 @@ static int argument(const char* arg, const char* value, void* call_data)
   return 1;
 }
 
-static int unknown_argument(const char* argument, void* call_data)
+static int unknown_argument(char const* argument, void* call_data)
 {
   std::cout << "Got unknown argument: \"" << argument << "\"" << std::endl;
   if (call_data != random_ptr) {
@@ -50,11 +50,11 @@ static bool CompareTwoItemsOnList(double i1, double i2)
 {
   return i1 == i2;
 }
-static bool CompareTwoItemsOnList(const char* i1, const char* i2)
+static bool CompareTwoItemsOnList(char const* i1, char const* i2)
 {
   return strcmp(i1, i2) == 0;
 }
-static bool CompareTwoItemsOnList(const std::string& i1, const std::string& i2)
+static bool CompareTwoItemsOnList(std::string const& i1, std::string const& i2)
 {
   return i1 == i2;
 }
@@ -93,7 +93,7 @@ int testCommandLineArguments(int argc, char* argv[])
   bool valid_bools[] = { true, true, false };
 
   std::vector<char*> strings_argument;
-  const char* valid_strings[] = { "andy", "bill", "brad", "ken" };
+  char const* valid_strings[] = { "andy", "bill", "brad", "ken" };
 
   std::vector<std::string> stl_strings_argument;
   std::string valid_stl_strings[] = { "ken", "brad", "bill", "andy" };
diff --git a/testCommandLineArguments1.cxx b/testCommandLineArguments1.cxx
index 2f6b735784e7ecde5170d8082e96341bc9eb1548..9fb777674767235bb45e38c0daed22c31d4d666b 100644
--- a/testCommandLineArguments1.cxx
+++ b/testCommandLineArguments1.cxx
@@ -57,7 +57,7 @@ int testCommandLineArguments1(int argc, char* argv[])
   int newArgc = 0;
   arg.GetUnusedArguments(&newArgc, &newArgv);
   int cc;
-  const char* valid_unused_args[9] = { nullptr,
+  char const* valid_unused_args[9] = { nullptr,
                                        "--ignored",
                                        "--second-ignored",
                                        "third-ignored",
diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx
index 64c61e2ff1fef0ff767942000bcfa92f051acde9..46687b29930d7df69b3f2dfb8ebfb1b833d7583b 100644
--- a/testConsoleBuf.cxx
+++ b/testConsoleBuf.cxx
@@ -62,20 +62,20 @@ static void displayError(DWORD errorCode)
   std::cerr.unsetf(std::ios::hex);
 }
 
-std::basic_streambuf<char>* errstream(const char* unused)
+std::basic_streambuf<char>* errstream(char const* unused)
 {
   static_cast<void>(unused);
   return std::cerr.rdbuf();
 }
 
-std::basic_streambuf<wchar_t>* errstream(const wchar_t* unused)
+std::basic_streambuf<wchar_t>* errstream(wchar_t const* unused)
 {
   static_cast<void>(unused);
   return std::wcerr.rdbuf();
 }
 
 template <typename T>
-static void dumpBuffers(const T* expected, const T* received, size_t size)
+static void dumpBuffers(T const* expected, T const* received, size_t size)
 {
   std::basic_ostream<T> err(errstream(expected));
   err << "Expected output: '" << std::basic_string<T>(expected, size) << "'"
@@ -346,7 +346,7 @@ static int testPipe()
           dumpBuffers<char>(encodedTestString.c_str(), buffer2,
                             encodedTestString.size());
         }
-      } catch (const std::runtime_error& ex) {
+      } catch (std::runtime_error const& ex) {
         DWORD lastError = GetLastError();
         std::cerr << "In function testPipe, line " << __LINE__ << ": "
                   << ex.what() << std::endl;
@@ -354,7 +354,7 @@ static int testPipe()
       }
       finishProcess(didFail == 0);
     }
-  } catch (const std::runtime_error& ex) {
+  } catch (std::runtime_error const& ex) {
     DWORD lastError = GetLastError();
     std::cerr << "In function testPipe, line " << __LINE__ << ": " << ex.what()
               << std::endl;
@@ -452,7 +452,7 @@ static int testFile()
           dumpBuffers<char>(encodedTestString.c_str(), buffer2,
                             encodedTestString.size());
         }
-      } catch (const std::runtime_error& ex) {
+      } catch (std::runtime_error const& ex) {
         DWORD lastError = GetLastError();
         std::cerr << "In function testFile, line " << __LINE__ << ": "
                   << ex.what() << std::endl;
@@ -460,7 +460,7 @@ static int testFile()
       }
       finishProcess(didFail == 0);
     }
-  } catch (const std::runtime_error& ex) {
+  } catch (std::runtime_error const& ex) {
     DWORD lastError = GetLastError();
     std::cerr << "In function testFile, line " << __LINE__ << ": " << ex.what()
               << std::endl;
@@ -524,7 +524,7 @@ static int testConsole()
 #      pragma warning(disable : 4996)
 #    endif
 #  endif
-  const bool isVistaOrGreater =
+  bool const isVistaOrGreater =
     LOBYTE(LOWORD(GetVersion())) >= HIBYTE(_WIN32_WINNT_VISTA);
 #  ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion
 #    ifdef __clang__
@@ -746,7 +746,7 @@ static int testConsole()
                              wideInputTestString.size() - 1);
       }
       delete[] outputBuffer;
-    } catch (const std::runtime_error& ex) {
+    } catch (std::runtime_error const& ex) {
       DWORD lastError = GetLastError();
       std::cerr << "In function testConsole, line " << __LINE__ << ": "
                 << ex.what() << std::endl;
diff --git a/testConsoleBuf.hxx b/testConsoleBuf.hxx
index e93cb4f0a1c0211fb3118ced44116a46f41051fa..b38e4b35e0d4935ad17e59a28e44227b510fe3ec 100644
--- a/testConsoleBuf.hxx
+++ b/testConsoleBuf.hxx
@@ -3,13 +3,13 @@
 #ifndef testConsoleBuf_hxx
 #define testConsoleBuf_hxx
 
-static const wchar_t cmdConsoleBufChild[] = L"testConsoleBufChild";
+static wchar_t const cmdConsoleBufChild[] = L"testConsoleBufChild";
 
-static const wchar_t BeforeInputEventName[] = L"BeforeInputEvent";
-static const wchar_t AfterOutputEventName[] = L"AfterOutputEvent";
+static wchar_t const BeforeInputEventName[] = L"BeforeInputEvent";
+static wchar_t const AfterOutputEventName[] = L"AfterOutputEvent";
 
 // यूनिकोड είναι здорово!
-static const wchar_t UnicodeTestString[] =
+static wchar_t const UnicodeTestString[] =
   L"\u092F\u0942\u0928\u093F\u0915\u094B\u0921 "
   L"\u03B5\u03AF\u03BD\0\u03B1\u03B9 "
   L"\u0437\u0434\u043E\u0440\u043E\u0432\u043E!";
diff --git a/testConsoleBufChild.cxx b/testConsoleBufChild.cxx
index 3c8fdc2e13b29fa7922d3a001c88e220abe13a66..f3c309e87adbc3d7686ff9e0b1d066f3ae1838d1 100644
--- a/testConsoleBufChild.cxx
+++ b/testConsoleBufChild.cxx
@@ -16,7 +16,7 @@
 
 #include "testConsoleBuf.hxx"
 
-int main(int argc, const char* argv[])
+int main(int argc, char const* argv[])
 {
 #if defined(_WIN32)
   kwsys::ConsoleBuf::Manager out(std::cout);
diff --git a/testDirectory.cxx b/testDirectory.cxx
index 8c73af2ae0859a0eea34766fe603e899f890ea65..83ac55d628244dfe0461935ed090fe8366e3d914 100644
--- a/testDirectory.cxx
+++ b/testDirectory.cxx
@@ -22,7 +22,7 @@ file Copyright.txt or https://cmake.org/licensing#kwsys for details.  */
 static int doLongPathTest()
 {
   using namespace kwsys;
-  static const int LONG_PATH_THRESHOLD = 512;
+  static int const LONG_PATH_THRESHOLD = 512;
   int res = 0;
   std::string topdir(TEST_SYSTEMTOOLS_BINARY_DIR "/directory_testing/");
   std::stringstream testpathstrm;
@@ -108,20 +108,20 @@ static int nonExistentDirectoryTest()
 static int copyDirectoryTest()
 {
   using namespace kwsys;
-  const std::string source(TEST_SYSTEMTOOLS_BINARY_DIR
+  std::string const source(TEST_SYSTEMTOOLS_BINARY_DIR
                            "/directory_testing/copyDirectoryTestSrc");
   if (SystemTools::PathExists(source)) {
     std::cerr << source << " shouldn't exist before test" << std::endl;
     return 1;
   }
-  const std::string destination(TEST_SYSTEMTOOLS_BINARY_DIR
+  std::string const destination(TEST_SYSTEMTOOLS_BINARY_DIR
                                 "/directory_testing/copyDirectoryTestDst");
   if (SystemTools::PathExists(destination)) {
     std::cerr << destination << " shouldn't exist before test" << std::endl;
     return 2;
   }
-  const Status copysuccess = SystemTools::CopyADirectory(source, destination);
-  const bool destinationexists = SystemTools::PathExists(destination);
+  Status const copysuccess = SystemTools::CopyADirectory(source, destination);
+  bool const destinationexists = SystemTools::PathExists(destination);
   if (copysuccess.IsSuccess()) {
     std::cerr << "CopyADirectory should have returned false" << std::endl;
     SystemTools::RemoveADirectory(destination);
diff --git a/testDynamicLoader.cxx b/testDynamicLoader.cxx
index a5095a5fc7bdf23bd90395424ec579fd665f0e4b..e893075c2057797f110ee759774283264baa6632 100644
--- a/testDynamicLoader.cxx
+++ b/testDynamicLoader.cxx
@@ -44,7 +44,7 @@
 // is referenced semantically.
 #include "testDynload.h"
 
-static std::string GetLibName(const char* lname, const char* subdir = nullptr)
+static std::string GetLibName(char const* lname, char const* subdir = nullptr)
 {
   // Construct proper name of lib
   std::string slname;
@@ -71,7 +71,7 @@ static std::string GetLibName(const char* lname, const char* subdir = nullptr)
  * r2: should GetSymbolAddress succeed ?
  * r3: should CloseLibrary succeed ?
  */
-static int TestDynamicLoader(const char* libname, const char* symbol, int r1,
+static int TestDynamicLoader(char const* libname, char const* symbol, int r1,
                              int r2, int r3, int flags = 0)
 {
   std::cerr << "Testing: " << libname << std::endl;
diff --git a/testEncode.c b/testEncode.c
index b7b6dd8458f5e204428dc724a97bcb9bbf1979b5..1e816152fbb4d5d4e5442479551aa21129159535 100644
--- a/testEncode.c
+++ b/testEncode.c
@@ -12,14 +12,14 @@
 #include <stdio.h>
 #include <string.h>
 
-static const unsigned char testMD5input1[] =
+static unsigned char const testMD5input1[] =
   "  A quick brown fox jumps over the lazy dog.\n"
   "  This is sample text for MD5 sum input.\n";
-static const char testMD5output1[] = "8f146af46ed4f267921bb937d4d3500c";
+static char const testMD5output1[] = "8f146af46ed4f267921bb937d4d3500c";
 
-static const int testMD5input2len = 28;
-static const unsigned char testMD5input2[] = "the cow jumped over the moon";
-static const char testMD5output2[] = "a2ad137b746138fae4e5adca9c85d3ae";
+static int const testMD5input2len = 28;
+static unsigned char const testMD5input2[] = "the cow jumped over the moon";
+static char const testMD5output2[] = "a2ad137b746138fae4e5adca9c85d3ae";
 
 static int testMD5_1(kwsysMD5* md5)
 {
diff --git a/testEncoding.cxx b/testEncoding.cxx
index 3acb6c8957f5570a70cafeb2f2878b32f519c61b..c65e85a62769e54626524101b8c7d022b8298276 100644
--- a/testEncoding.cxx
+++ b/testEncoding.cxx
@@ -22,7 +22,7 @@
 #  include "Encoding.hxx.in"
 #endif
 
-static const unsigned char helloWorldStrings[][32] = {
+static unsigned char const helloWorldStrings[][32] = {
   // English
   { 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', 0 },
   // Japanese
@@ -53,7 +53,7 @@ static int testHelloWorldEncoding()
 {
   int ret = 0;
   for (int i = 0; helloWorldStrings[i][0] != 0; i++) {
-    std::string str = reinterpret_cast<const char*>(helloWorldStrings[i]);
+    std::string str = reinterpret_cast<char const*>(helloWorldStrings[i]);
     std::cout << str << std::endl;
     std::wstring wstr = kwsys::Encoding::ToWide(str);
     std::string str2 = kwsys::Encoding::ToNarrow(wstr);
@@ -86,7 +86,7 @@ static int testRobustEncoding()
 
   wstr = kwsys::Encoding::ToWide(nullptr);
   if (!wstr.empty()) {
-    const wchar_t* wcstr = wstr.c_str();
+    wchar_t const* wcstr = wstr.c_str();
     std::cout << "ToWide(NULL) returned";
     for (size_t i = 0; i < wstr.size(); i++) {
       std::cout << " " << std::hex << static_cast<int>(wcstr[i]);
@@ -96,7 +96,7 @@ static int testRobustEncoding()
   }
   wstr = kwsys::Encoding::ToWide("");
   if (!wstr.empty()) {
-    const wchar_t* wcstr = wstr.c_str();
+    wchar_t const* wcstr = wstr.c_str();
     std::cout << "ToWide(\"\") returned";
     for (size_t i = 0; i < wstr.size(); i++) {
       std::cout << " " << std::hex << static_cast<int>(wcstr[i]);
@@ -268,7 +268,7 @@ static int testToWindowsExtendedPath()
 
 int testEncoding(int, char*[])
 {
-  const char* loc = setlocale(LC_ALL, "");
+  char const* loc = setlocale(LC_ALL, "");
   if (loc) {
     std::cout << "Locale: " << loc << std::endl;
   } else {
diff --git a/testFStream.cxx b/testFStream.cxx
index 9897a5870e1c895908c9ce1278ac8fa53ff784e5..eea7f4b2ae7d88d307371efd39dd067a194149e0 100644
--- a/testFStream.cxx
+++ b/testFStream.cxx
@@ -27,8 +27,8 @@ static int testNoFile()
   return 0;
 }
 
-static const int num_test_files = 7;
-static const int max_test_file_size = 45;
+static int const num_test_files = 7;
+static int const max_test_file_size = 45;
 
 static kwsys::FStream::BOM expected_bom[num_test_files] = {
   kwsys::FStream::BOM_None,    kwsys::FStream::BOM_None,
@@ -71,9 +71,9 @@ static int testBOM()
   for (int i = 0; i < num_test_files; i++) {
     {
       kwsys::ofstream out("bom.txt", kwsys::ofstream::binary);
-      out.write(reinterpret_cast<const char*>(expected_bom_data[i] + 1),
+      out.write(reinterpret_cast<char const*>(expected_bom_data[i] + 1),
                 *expected_bom_data[i]);
-      out.write(reinterpret_cast<const char*>(file_data[i] + 1),
+      out.write(reinterpret_cast<char const*>(file_data[i] + 1),
                 file_data[i][0]);
     }
 
@@ -106,9 +106,9 @@ static int testBOMIO()
     kwsys::fstream f("bomio.txt",
                      kwsys::fstream::in | kwsys::fstream::out |
                        kwsys::fstream::binary | kwsys::fstream::trunc);
-    f.write(reinterpret_cast<const char*>(expected_bom_data[i] + 1),
+    f.write(reinterpret_cast<char const*>(expected_bom_data[i] + 1),
             *expected_bom_data[i]);
-    f.write(reinterpret_cast<const char*>(file_data[i] + 1), file_data[i][0]);
+    f.write(reinterpret_cast<char const*>(file_data[i] + 1), file_data[i][0]);
     if (!f.good()) {
       std::cout << "Unable to write data " << i << std::endl;
       return 1;
diff --git a/testProcess.c b/testProcess.c
index fcc31daf207fdfe7c5c6bc46e7df0df9db5495ee..137bd4bf06659b515bd988481d9ebcdbaa42a559 100644
--- a/testProcess.c
+++ b/testProcess.c
@@ -59,11 +59,11 @@ static void testProcess_sleep(unsigned int sec)
 }
 #endif
 
-int runChild(const char* cmd[], int state, int exception, int value, int share,
+int runChild(char const* cmd[], int state, int exception, int value, int share,
              int output, int delay, double timeout, int poll, int repeat,
              int disown, int createNewGroup, unsigned int interruptDelay);
 
-static int test1(int argc, const char* argv[])
+static int test1(int argc, char const* argv[])
 {
   /* This is a very basic functional test of kwsysProcess.  It is repeated
      numerous times to verify that there are no resource leaks in kwsysProcess
@@ -82,7 +82,7 @@ static int test1(int argc, const char* argv[])
   return 0;
 }
 
-static int test2(int argc, const char* argv[])
+static int test2(int argc, char const* argv[])
 {
   (void)argc;
   (void)argv;
@@ -91,7 +91,7 @@ static int test2(int argc, const char* argv[])
   return 123;
 }
 
-static int test3(int argc, const char* argv[])
+static int test3(int argc, char const* argv[])
 {
   (void)argc;
   (void)argv;
@@ -105,7 +105,7 @@ static int test3(int argc, const char* argv[])
   return 0;
 }
 
-static int test4(int argc, const char* argv[])
+static int test4(int argc, char const* argv[])
 {
 #ifndef CRASH_USING_ABORT
   /* Prepare a pointer to an invalid address.  Don't use null, because
@@ -113,7 +113,7 @@ static int test4(int argc, const char* argv[])
   do whatever they want. ex: Clang will warn at compile time, or even
   optimize away the write. We hope to 'outsmart' them by using
   'volatile' and a slightly larger address, based on a runtime value. */
-  volatile int* invalidAddress = 0;
+  int volatile* invalidAddress = 0;
   invalidAddress += argc ? 1 : 2;
 #endif
 
@@ -142,10 +142,10 @@ static int test4(int argc, const char* argv[])
   return 0;
 }
 
-static int test5(int argc, const char* argv[])
+static int test5(int argc, char const* argv[])
 {
   int r;
-  const char* cmd[4];
+  char const* cmd[4];
   (void)argc;
   cmd[0] = argv[0];
   cmd[1] = "run";
@@ -170,7 +170,7 @@ static int test5(int argc, const char* argv[])
 }
 
 #define TEST6_SIZE (4096 * 2)
-static void test6(int argc, const char* argv[])
+static void test6(int argc, char const* argv[])
 {
   int i;
   char runaway[TEST6_SIZE + 1];
@@ -193,7 +193,7 @@ static void test6(int argc, const char* argv[])
    delaying 1/10th of a second should ever have to poll.  */
 #define MINPOLL 5
 #define MAXPOLL 20
-static int test7(int argc, const char* argv[])
+static int test7(int argc, char const* argv[])
 {
   (void)argc;
   (void)argv;
@@ -210,12 +210,12 @@ static int test7(int argc, const char* argv[])
   return 0;
 }
 
-static int test8(int argc, const char* argv[])
+static int test8(int argc, char const* argv[])
 {
   /* Create a disowned grandchild to test handling of processes
      that exit before their children.  */
   int r;
-  const char* cmd[4];
+  char const* cmd[4];
   (void)argc;
   cmd[0] = argv[0];
   cmd[1] = "run";
@@ -234,7 +234,7 @@ static int test8(int argc, const char* argv[])
   return r;
 }
 
-static int test8_grandchild(int argc, const char* argv[])
+static int test8_grandchild(int argc, char const* argv[])
 {
   (void)argc;
   (void)argv;
@@ -252,7 +252,7 @@ static int test8_grandchild(int argc, const char* argv[])
   return 0;
 }
 
-static int test9(int argc, const char* argv[])
+static int test9(int argc, char const* argv[])
 {
   /* Test Ctrl+C behavior: the root test program will send a Ctrl+C to this
      process.  Here, we start a child process that sleeps for a long time
@@ -262,7 +262,7 @@ static int test9(int argc, const char* argv[])
      WARNING:  This test will falsely pass if the share parameter of runChild
      was set to 0 when invoking the test9 process.  */
   int r;
-  const char* cmd[4];
+  char const* cmd[4];
   (void)argc;
   cmd[0] = argv[0];
   cmd[1] = "run";
@@ -296,7 +296,7 @@ static BOOL WINAPI test9_grandchild_handler(DWORD dwCtrlType)
 }
 #endif
 
-static int test9_grandchild(int argc, const char* argv[])
+static int test9_grandchild(int argc, char const* argv[])
 {
   /* The grandchild just sleeps for a few seconds while ignoring signals.  */
   (void)argc;
@@ -327,7 +327,7 @@ static int test9_grandchild(int argc, const char* argv[])
   return 0;
 }
 
-static int test10(int argc, const char* argv[])
+static int test10(int argc, char const* argv[])
 {
   /* Test Ctrl+C behavior: the root test program will send a Ctrl+C to this
      process.  Here, we start a child process that sleeps for a long time and
@@ -335,7 +335,7 @@ static int test10(int argc, const char* argv[])
      process group - ensuring that Ctrl+C we receive is sent to our process
      groups.  We make sure it exits anyway.  */
   int r;
-  const char* cmd[4];
+  char const* cmd[4];
   (void)argc;
   cmd[0] = argv[0];
   cmd[1] = "run";
@@ -355,7 +355,7 @@ static int test10(int argc, const char* argv[])
   return r;
 }
 
-static int test10_grandchild(int argc, const char* argv[])
+static int test10_grandchild(int argc, char const* argv[])
 {
   /* The grandchild just sleeps for a few seconds and handles signals.  */
   (void)argc;
@@ -373,7 +373,7 @@ static int test10_grandchild(int argc, const char* argv[])
   return 0;
 }
 
-static int runChild2(kwsysProcess* kp, const char* cmd[], int state,
+static int runChild2(kwsysProcess* kp, char const* cmd[], int state,
                      int exception, int value, int share, int output,
                      int delay, double timeout, int poll, int disown,
                      int createNewGroup, unsigned int interruptDelay)
@@ -541,7 +541,7 @@ static int runChild2(kwsysProcess* kp, const char* cmd[], int state,
  *                  BEFORE any reading/polling of pipes occurs and before any
  *                  detachment occurs.
  */
-int runChild(const char* cmd[], int state, int exception, int value, int share,
+int runChild(char const* cmd[], int state, int exception, int value, int share,
              int output, int delay, double timeout, int poll, int repeat,
              int disown, int createNewGroup, unsigned int interruptDelay)
 {
@@ -562,7 +562,7 @@ int runChild(const char* cmd[], int state, int exception, int value, int share,
   return result;
 }
 
-int main(int argc, const char* argv[])
+int main(int argc, char const* argv[])
 {
   int n = 0;
 
@@ -665,7 +665,7 @@ int main(int argc, const char* argv[])
     int createNewGroups[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
     unsigned int interruptDelays[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 3, 2 };
     int r;
-    const char* cmd[4];
+    char const* cmd[4];
 #ifdef _WIN32
     char* argv0 = 0;
 #endif
@@ -715,7 +715,7 @@ int main(int argc, const char* argv[])
   if (argc > 2 && strcmp(argv[1], "0") == 0) {
     /* This is the special debugging test to run a given command
        line.  */
-    const char** cmd = argv + 2;
+    char const** cmd = argv + 2;
     int state = kwsysProcess_State_Exited;
     int exception = kwsysProcess_Exception_None;
     int value = 0;
diff --git a/testSystemTools.cxx b/testSystemTools.cxx
index 9275043141b6f5d22b6274f65ec88e968761e81d..055ffd1869284c110a15d7fcdf7075058e8ae3e6 100644
--- a/testSystemTools.cxx
+++ b/testSystemTools.cxx
@@ -37,7 +37,7 @@
 typedef unsigned short mode_t;
 #endif
 
-static const char* toUnixPaths[][2] = {
+static char const* toUnixPaths[][2] = {
   { "/usr/local/bin/passwd", "/usr/local/bin/passwd" },
   { "/usr/lo cal/bin/pa sswd", "/usr/lo cal/bin/pa sswd" },
   { "/usr/lo\\ cal/bin/pa\\ sswd", "/usr/lo/ cal/bin/pa/ sswd" },
@@ -69,14 +69,14 @@ static bool CheckConvertToUnixSlashes(std::string const& input,
   return true;
 }
 
-static const char* checkEscapeChars[][4] = {
+static char const* checkEscapeChars[][4] = {
   { "1 foo 2 bar 2", "12", "\\", "\\1 foo \\2 bar \\2" },
   { " {} ", "{}", "#", " #{#} " },
   { nullptr, nullptr, nullptr, nullptr }
 };
 
 static bool CheckEscapeChars(std::string const& input,
-                             const char* chars_to_escape, char escape_char,
+                             char const* chars_to_escape, char escape_char,
                              std::string const& output)
 {
   std::string result = kwsys::SystemTools::EscapeChars(
@@ -92,16 +92,16 @@ static bool CheckEscapeChars(std::string const& input,
 static bool CheckFileOperations()
 {
   bool res = true;
-  const std::string testNonExistingFile(TEST_SYSTEMTOOLS_SOURCE_DIR
+  std::string const testNonExistingFile(TEST_SYSTEMTOOLS_SOURCE_DIR
                                         "/testSystemToolsNonExistingFile");
-  const std::string testDotFile(TEST_SYSTEMTOOLS_SOURCE_DIR "/.");
-  const std::string testBinFile(TEST_SYSTEMTOOLS_SOURCE_DIR
+  std::string const testDotFile(TEST_SYSTEMTOOLS_SOURCE_DIR "/.");
+  std::string const testBinFile(TEST_SYSTEMTOOLS_SOURCE_DIR
                                 "/testSystemTools.bin");
-  const std::string testTxtFile(TEST_SYSTEMTOOLS_SOURCE_DIR
+  std::string const testTxtFile(TEST_SYSTEMTOOLS_SOURCE_DIR
                                 "/testSystemTools.cxx");
-  const std::string testNewDir(TEST_SYSTEMTOOLS_BINARY_DIR
+  std::string const testNewDir(TEST_SYSTEMTOOLS_BINARY_DIR
                                "/testSystemToolsNewDir");
-  const std::string testNewFile(testNewDir + "/testNewFile.txt");
+  std::string const testNewFile(testNewDir + "/testNewFile.txt");
 
   if (kwsys::SystemTools::DetectFileType(testNonExistingFile.c_str()) !=
       kwsys::SystemTools::FileTypeUnknown) {
@@ -470,7 +470,7 @@ static bool CheckFileOperations()
   // Perform the same file and directory creation and deletion tests but
   // with paths > 256 characters in length.
 
-  const std::string testNewLongDir(
+  std::string const testNewLongDir(
     TEST_SYSTEMTOOLS_BINARY_DIR
     "/"
     "012345678901234567890123456789012345678901234567890123456789"
@@ -478,7 +478,7 @@ static bool CheckFileOperations()
     "012345678901234567890123456789012345678901234567890123456789"
     "012345678901234567890123456789012345678901234567890123456789"
     "01234567890123");
-  const std::string testNewLongFile(
+  std::string const testNewLongFile(
     testNewLongDir +
     "/"
     "012345678901234567890123456789012345678901234567890123456789"
@@ -667,8 +667,8 @@ static bool CheckStringOperations()
   return res;
 }
 
-static bool CheckPutEnv(const std::string& env, const char* name,
-                        const char* value)
+static bool CheckPutEnv(std::string const& env, char const* name,
+                        char const* value)
 {
   if (!kwsys::SystemTools::PutEnv(env)) {
     std::cerr << "PutEnv(\"" << env << "\") failed!" << std::endl;
@@ -684,7 +684,7 @@ static bool CheckPutEnv(const std::string& env, const char* name,
   return true;
 }
 
-static bool CheckUnPutEnv(const char* env, const char* name)
+static bool CheckUnPutEnv(char const* env, char const* name)
 {
   if (!kwsys::SystemTools::UnPutEnv(env)) {
     std::cerr << "UnPutEnv(\"" << env << "\") failed!" << std::endl;
@@ -713,9 +713,9 @@ static bool CheckEnvironmentOperations()
   return res;
 }
 
-static bool CheckRelativePath(const std::string& local,
-                              const std::string& remote,
-                              const std::string& expected)
+static bool CheckRelativePath(std::string const& local,
+                              std::string const& remote,
+                              std::string const& expected)
 {
   std::string result = kwsys::SystemTools::RelativePath(local, remote);
   if (!kwsys::SystemTools::ComparePath(expected, result)) {
@@ -738,9 +738,9 @@ static bool CheckRelativePaths()
   return res;
 }
 
-static bool CheckCollapsePath(const std::string& path,
-                              const std::string& expected,
-                              const char* base = nullptr)
+static bool CheckCollapsePath(std::string const& path,
+                              std::string const& expected,
+                              char const* base = nullptr)
 {
   std::string result = kwsys::SystemTools::CollapseFullPath(path, base);
   if (!kwsys::SystemTools::ComparePath(expected, result)) {
@@ -772,7 +772,7 @@ static bool CheckCollapsePath()
   return res;
 }
 
-static std::string StringVectorToString(const std::vector<std::string>& vec)
+static std::string StringVectorToString(std::vector<std::string> const& vec)
 {
   std::stringstream ss;
   ss << "vector(";
@@ -788,13 +788,13 @@ static std::string StringVectorToString(const std::vector<std::string>& vec)
 
 static bool CheckGetPath()
 {
-  const char* envName = "S";
+  char const* envName = "S";
 #ifdef _WIN32
-  const char* envValue = "C:\\Somewhere\\something;D:\\Temp";
+  char const* envValue = "C:\\Somewhere\\something;D:\\Temp";
 #else
-  const char* envValue = "/Somewhere/something:/tmp";
+  char const* envValue = "/Somewhere/something:/tmp";
 #endif
-  const char* registryPath = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MyApp; MyKey]";
+  char const* registryPath = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MyApp; MyKey]";
 
   std::vector<std::string> originalPaths;
   originalPaths.emplace_back(registryPath);
@@ -829,8 +829,8 @@ static bool CheckGetPath()
 
 static bool CheckGetFilenameName()
 {
-  const char* windowsFilepath = "C:\\somewhere\\something";
-  const char* unixFilepath = "/somewhere/something";
+  char const* windowsFilepath = "C:\\somewhere\\something";
+  char const* unixFilepath = "/somewhere/something";
 
 #if defined(_WIN32) || defined(KWSYS_SYSTEMTOOLS_SUPPORT_WINDOWS_SLASHES)
   std::string expectedWindowsFilename = "something";
@@ -860,8 +860,8 @@ static bool CheckGetFilenameName()
 static bool CheckFind()
 {
   bool res = true;
-  const std::string testFindFileName("testFindFile.txt");
-  const std::string testFindFile(TEST_SYSTEMTOOLS_BINARY_DIR "/" +
+  std::string const testFindFileName("testFindFile.txt");
+  std::string const testFindFile(TEST_SYSTEMTOOLS_BINARY_DIR "/" +
                                  testFindFileName);
 
   if (!kwsys::SystemTools::Touch(testFindFile, true)) {
@@ -923,7 +923,7 @@ static bool CheckIsSubDirectory()
 
 static bool CheckGetLineFromStream()
 {
-  const std::string fileWithFiveCharsOnFirstLine(TEST_SYSTEMTOOLS_SOURCE_DIR
+  std::string const fileWithFiveCharsOnFirstLine(TEST_SYSTEMTOOLS_SOURCE_DIR
                                                  "/README.rst");
 
   kwsys::ifstream file(fileWithFiveCharsOnFirstLine.c_str(), std::ios::in);
@@ -974,7 +974,7 @@ static bool CheckGetLineFromStream()
 
 static bool CheckGetLineFromStreamLongLine()
 {
-  const std::string fileWithLongLine("longlines.txt");
+  std::string const fileWithLongLine("longlines.txt");
   std::string firstLine, secondLine;
   // First line: large buffer, containing a carriage return for some reason.
   firstLine.assign(2050, ' ');
@@ -1047,7 +1047,7 @@ static bool CheckGetLineFromStreamLongLine()
   return true;
 }
 
-static bool writeFile(const char* fileName, const char* data)
+static bool writeFile(char const* fileName, char const* data)
 {
   kwsys::ofstream out(fileName, std::ios::binary);
   out << data;
@@ -1058,7 +1058,7 @@ static bool writeFile(const char* fileName, const char* data)
   return true;
 }
 
-static std::string readFile(const char* fileName)
+static std::string readFile(char const* fileName)
 {
   kwsys::ifstream in(fileName, std::ios::binary);
   std::stringstream sstr;
@@ -1073,8 +1073,8 @@ static std::string readFile(const char* fileName)
 
 struct
 {
-  const char* a;
-  const char* b;
+  char const* a;
+  char const* b;
   bool differ;
 } diff_test_cases[] = { { "one", "one", false },
                         { "one", "two", true },
@@ -1088,7 +1088,7 @@ struct
 
 static bool CheckTextFilesDiffer()
 {
-  const int num_test_cases =
+  int const num_test_cases =
     sizeof(diff_test_cases) / sizeof(diff_test_cases[0]);
   for (int i = 0; i < num_test_cases; ++i) {
     if (!writeFile("file_a", diff_test_cases[i].a) ||
@@ -1109,14 +1109,14 @@ static bool CheckTextFilesDiffer()
 static bool CheckCopyFileIfDifferent()
 {
   bool ret = true;
-  const int num_test_cases =
+  int const num_test_cases =
     sizeof(diff_test_cases) / sizeof(diff_test_cases[0]);
   for (int i = 0; i < num_test_cases; ++i) {
     if (!writeFile("file_a", diff_test_cases[i].a) ||
         !writeFile("file_b", diff_test_cases[i].b)) {
       return false;
     }
-    const char* cptarget =
+    char const* cptarget =
       i < 4 ? TEST_SYSTEMTOOLS_BINARY_DIR "/file_b" : "file_b";
     if (!kwsys::SystemTools::CopyFileIfDifferent("file_a", cptarget)) {
       std::cerr << "CopyFileIfDifferent() returned false for test case "
@@ -1178,7 +1178,7 @@ static bool CheckSplitString()
   bool ret = true;
 
   auto check_split = [](std::string const& input,
-                        std::initializer_list<const char*> expected) -> bool {
+                        std::initializer_list<char const*> expected) -> bool {
     auto const components = kwsys::SystemTools::SplitString(input, '/');
     if (components.size() != expected.size()) {
       std::cerr << "Incorrect split count for " << input << ": "