Browse Source

Source sweep: Use cmIsOn instead of cmSystemTools::IsOn

This replaces invocations of

- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
Sebastian Holtermann 6 years ago
parent
commit
20e580be01
62 changed files with 185 additions and 206 deletions
  1. 4 4
      Source/CPack/IFW/cmCPackIFWGenerator.cxx
  2. 2 2
      Source/CPack/WiX/cmCPackWIXGenerator.cxx
  3. 1 1
      Source/CPack/cmCPackDebGenerator.cxx
  4. 4 6
      Source/CPack/cmCPackExternalGenerator.cxx
  5. 9 11
      Source/CPack/cmCPackGenerator.cxx
  6. 3 5
      Source/CPack/cmCPackNSISGenerator.cxx
  7. 2 1
      Source/CPack/cmCPackRPMGenerator.cxx
  8. 1 1
      Source/CTest/cmCTestBuildHandler.cxx
  9. 1 1
      Source/CTest/cmCTestGIT.cxx
  10. 2 2
      Source/CTest/cmCTestSubmitHandler.cxx
  11. 7 7
      Source/CTest/cmCTestTestHandler.cxx
  12. 2 2
      Source/CTest/cmCTestVC.cxx
  13. 1 1
      Source/CursesDialog/cmCursesCacheEntryComposite.cxx
  14. 2 1
      Source/CursesDialog/cmCursesMainForm.cxx
  15. 2 1
      Source/QtDialog/QCMake.cxx
  16. 2 2
      Source/cmAddLibraryCommand.cxx
  17. 1 1
      Source/cmCPluginAPI.cxx
  18. 4 5
      Source/cmCTest.cxx
  19. 2 2
      Source/cmCacheManager.cxx
  20. 2 2
      Source/cmComputeLinkInformation.cxx
  21. 5 5
      Source/cmConditionEvaluator.cxx
  22. 2 2
      Source/cmExtraCodeBlocksGenerator.cxx
  23. 1 1
      Source/cmExtraSublimeTextGenerator.cxx
  24. 3 3
      Source/cmFileCommand.cxx
  25. 2 1
      Source/cmFileInstaller.cxx
  26. 1 1
      Source/cmFindBase.cxx
  27. 1 1
      Source/cmFindCommon.cxx
  28. 4 5
      Source/cmFindPackageCommand.cxx
  29. 1 1
      Source/cmGeneratorExpressionNode.cxx
  30. 8 8
      Source/cmGeneratorTarget.cxx
  31. 1 1
      Source/cmGetFilenameComponentCommand.cxx
  32. 3 6
      Source/cmGhsMultiTargetGenerator.cxx
  33. 12 14
      Source/cmGlobalGenerator.cxx
  34. 7 10
      Source/cmGlobalGhsMultiGenerator.cxx
  35. 2 1
      Source/cmGlobalUnixMakefileGenerator3.cxx
  36. 2 3
      Source/cmGlobalVisualStudio7Generator.cxx
  37. 1 1
      Source/cmGlobalVisualStudio8Generator.cxx
  38. 1 1
      Source/cmGlobalVisualStudioGenerator.cxx
  39. 3 4
      Source/cmGlobalXCodeGenerator.cxx
  40. 2 1
      Source/cmIncludeDirectoryCommand.cxx
  41. 1 2
      Source/cmInstalledFile.cxx
  42. 2 3
      Source/cmLinkLineDeviceComputer.cxx
  43. 6 7
      Source/cmLocalGenerator.cxx
  44. 3 3
      Source/cmLocalUnixMakefileGenerator3.cxx
  45. 7 7
      Source/cmMakefile.cxx
  46. 4 4
      Source/cmMakefileTargetGenerator.cxx
  47. 1 2
      Source/cmOptionCommand.cxx
  48. 2 4
      Source/cmQtAutoGenGlobalInitializer.cxx
  49. 2 3
      Source/cmQtAutoGenInitializer.cxx
  50. 2 2
      Source/cmQtAutoGenerator.cxx
  51. 3 2
      Source/cmSetPropertyCommand.cxx
  52. 2 2
      Source/cmSetSourceFilesPropertiesCommand.cxx
  53. 2 1
      Source/cmSiteNameCommand.cxx
  54. 3 2
      Source/cmSourceFile.cxx
  55. 1 1
      Source/cmState.cxx
  56. 1 1
      Source/cmStateDirectory.cxx
  57. 1 1
      Source/cmStateSnapshot.cxx
  58. 2 2
      Source/cmTarget.cxx
  59. 2 2
      Source/cmTest.cxx
  60. 10 10
      Source/cmVisualStudio10TargetGenerator.cxx
  61. 9 13
      Source/cmake.cxx
  62. 3 4
      Source/cmcmd.cxx

+ 4 - 4
Source/CPack/IFW/cmCPackIFWGenerator.cxx

@@ -254,7 +254,7 @@ int cmCPackIFWGenerator::InitializeInternal()
   // Look 'binarycreator' executable (needs)
   // Look 'binarycreator' executable (needs)
 
 
   const char* BinCreatorStr = this->GetOption(BinCreatorOpt);
   const char* BinCreatorStr = this->GetOption(BinCreatorOpt);
-  if (!BinCreatorStr || cmSystemTools::IsNOTFOUND(BinCreatorStr)) {
+  if (!BinCreatorStr || cmIsNOTFOUND(BinCreatorStr)) {
     this->BinCreator.clear();
     this->BinCreator.clear();
   } else {
   } else {
     this->BinCreator = BinCreatorStr;
     this->BinCreator = BinCreatorStr;
@@ -271,7 +271,7 @@ int cmCPackIFWGenerator::InitializeInternal()
   // Look 'repogen' executable (optional)
   // Look 'repogen' executable (optional)
 
 
   const char* RepoGenStr = this->GetOption(RepoGenOpt);
   const char* RepoGenStr = this->GetOption(RepoGenOpt);
-  if (!RepoGenStr || cmSystemTools::IsNOTFOUND(RepoGenStr)) {
+  if (!RepoGenStr || cmIsNOTFOUND(RepoGenStr)) {
     this->RepoGen.clear();
     this->RepoGen.clear();
   } else {
   } else {
     this->RepoGen = RepoGenStr;
     this->RepoGen = RepoGenStr;
@@ -325,10 +325,10 @@ int cmCPackIFWGenerator::InitializeInternal()
   }
   }
 
 
   if (const char* ifwDownloadAll = this->GetOption("CPACK_IFW_DOWNLOAD_ALL")) {
   if (const char* ifwDownloadAll = this->GetOption("CPACK_IFW_DOWNLOAD_ALL")) {
-    this->OnlineOnly = cmSystemTools::IsOn(ifwDownloadAll);
+    this->OnlineOnly = cmIsOn(ifwDownloadAll);
   } else if (const char* cpackDownloadAll =
   } else if (const char* cpackDownloadAll =
                this->GetOption("CPACK_DOWNLOAD_ALL")) {
                this->GetOption("CPACK_DOWNLOAD_ALL")) {
-    this->OnlineOnly = cmSystemTools::IsOn(cpackDownloadAll);
+    this->OnlineOnly = cmIsOn(cpackDownloadAll);
   } else {
   } else {
     this->OnlineOnly = false;
     this->OnlineOnly = false;
   }
   }

+ 2 - 2
Source/CPack/WiX/cmCPackWIXGenerator.cxx

@@ -238,7 +238,7 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
 
 
   // if install folder is supposed to be set absolutely, the default
   // if install folder is supposed to be set absolutely, the default
   // component guid "*" cannot be used
   // component guid "*" cannot be used
-  if (cmSystemTools::IsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER"))) {
+  if (cmIsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER"))) {
     this->ComponentGuidType = cmWIXSourceWriter::CMAKE_GENERATED_GUID;
     this->ComponentGuidType = cmWIXSourceWriter::CMAKE_GENERATED_GUID;
   }
   }
 
 
@@ -582,7 +582,7 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
 
 
 std::string cmCPackWIXGenerator::GetRootFolderId() const
 std::string cmCPackWIXGenerator::GetRootFolderId() const
 {
 {
-  if (cmSystemTools::IsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER"))) {
+  if (cmIsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER"))) {
     return "";
     return "";
   }
   }
 
 

+ 1 - 1
Source/CPack/cmCPackDebGenerator.cxx

@@ -440,7 +440,7 @@ cmCPackDebGenerator::~cmCPackDebGenerator() = default;
 int cmCPackDebGenerator::InitializeInternal()
 int cmCPackDebGenerator::InitializeInternal()
 {
 {
   this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
   this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
-  if (cmSystemTools::IsOff(this->GetOption("CPACK_SET_DESTDIR"))) {
+  if (cmIsOff(this->GetOption("CPACK_SET_DESTDIR"))) {
     this->SetOption("CPACK_SET_DESTDIR", "I_ON");
     this->SetOption("CPACK_SET_DESTDIR", "I_ON");
   }
   }
   return this->Superclass::InitializeInternal();
   return this->Superclass::InitializeInternal();

+ 4 - 6
Source/CPack/cmCPackExternalGenerator.cxx

@@ -5,6 +5,7 @@
 #include "cmCPackComponentGroup.h"
 #include "cmCPackComponentGroup.h"
 #include "cmCPackLog.h"
 #include "cmCPackLog.h"
 #include "cmMakefile.h"
 #include "cmMakefile.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 #include "cm_jsoncpp_value.h"
 #include "cm_jsoncpp_value.h"
@@ -149,8 +150,7 @@ int cmCPackExternalGenerator::InstallCMakeProject(
 
 
 bool cmCPackExternalGenerator::StagingEnabled() const
 bool cmCPackExternalGenerator::StagingEnabled() const
 {
 {
-  return !cmSystemTools::IsOff(
-    this->GetOption("CPACK_EXTERNAL_ENABLE_STAGING"));
+  return !cmIsOff(this->GetOption("CPACK_EXTERNAL_ENABLE_STAGING"));
 }
 }
 
 
 cmCPackExternalGenerator::cmCPackExternalVersionGenerator::
 cmCPackExternalGenerator::cmCPackExternalVersionGenerator::
@@ -208,8 +208,7 @@ int cmCPackExternalGenerator::cmCPackExternalVersionGenerator::WriteToJSON(
   if (defaultDirectoryPermissions && *defaultDirectoryPermissions) {
   if (defaultDirectoryPermissions && *defaultDirectoryPermissions) {
     root["defaultDirectoryPermissions"] = defaultDirectoryPermissions;
     root["defaultDirectoryPermissions"] = defaultDirectoryPermissions;
   }
   }
-  if (cmSystemTools::IsInternallyOn(
-        this->Parent->GetOption("CPACK_SET_DESTDIR"))) {
+  if (cmIsInternallyOn(this->Parent->GetOption("CPACK_SET_DESTDIR"))) {
     root["setDestdir"] = true;
     root["setDestdir"] = true;
     root["packagingInstallPrefix"] =
     root["packagingInstallPrefix"] =
       this->Parent->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
       this->Parent->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
@@ -217,8 +216,7 @@ int cmCPackExternalGenerator::cmCPackExternalVersionGenerator::WriteToJSON(
     root["setDestdir"] = false;
     root["setDestdir"] = false;
   }
   }
 
 
-  root["stripFiles"] =
-    !cmSystemTools::IsOff(this->Parent->GetOption("CPACK_STRIP_FILES"));
+  root["stripFiles"] = !cmIsOff(this->Parent->GetOption("CPACK_STRIP_FILES"));
   root["warnOnAbsoluteInstallDestination"] =
   root["warnOnAbsoluteInstallDestination"] =
     this->Parent->IsOn("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION");
     this->Parent->IsOn("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION");
   root["errorOnAbsoluteInstallDestination"] =
   root["errorOnAbsoluteInstallDestination"] =

+ 9 - 11
Source/CPack/cmCPackGenerator.cxx

@@ -180,8 +180,8 @@ int cmCPackGenerator::InstallProject()
   std::string bareTempInstallDirectory =
   std::string bareTempInstallDirectory =
     this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
     this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
   std::string tempInstallDirectoryStr = bareTempInstallDirectory;
   std::string tempInstallDirectoryStr = bareTempInstallDirectory;
-  bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR")) |
-    cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
+  bool setDestDir = cmIsOn(this->GetOption("CPACK_SET_DESTDIR")) |
+    cmIsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
   if (!setDestDir) {
   if (!setDestDir) {
     tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
     tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
   }
   }
@@ -750,7 +750,7 @@ int cmCPackGenerator::InstallCMakeProject(
     // CPACK_PACKAGING_INSTALL_PREFIX
     // CPACK_PACKAGING_INSTALL_PREFIX
     // I know this is tricky and awkward but it's the price for
     // I know this is tricky and awkward but it's the price for
     // CPACK_SET_DESTDIR backward compatibility.
     // CPACK_SET_DESTDIR backward compatibility.
-    if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"))) {
+    if (cmIsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"))) {
       this->SetOption("CPACK_INSTALL_PREFIX",
       this->SetOption("CPACK_INSTALL_PREFIX",
                       this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
                       this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
     }
     }
@@ -826,7 +826,7 @@ int cmCPackGenerator::InstallCMakeProject(
 
 
   // strip on TRUE, ON, 1, one or several file names, but not on
   // strip on TRUE, ON, 1, one or several file names, but not on
   // FALSE, OFF, 0 and an empty string
   // FALSE, OFF, 0 and an empty string
-  if (!cmSystemTools::IsOff(this->GetOption("CPACK_STRIP_FILES"))) {
+  if (!cmIsOff(this->GetOption("CPACK_STRIP_FILES"))) {
     mf.AddDefinition("CMAKE_INSTALL_DO_STRIP", "1");
     mf.AddDefinition("CMAKE_INSTALL_DO_STRIP", "1");
   }
   }
   // Remember the list of files before installation
   // Remember the list of files before installation
@@ -977,8 +977,7 @@ int cmCPackGenerator::DoPackage()
     return 0;
     return 0;
   }
   }
 
 
-  if (cmSystemTools::IsOn(
-        this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY"))) {
+  if (cmIsOn(this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY"))) {
     const char* toplevelDirectory =
     const char* toplevelDirectory =
       this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
       this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
     if (cmSystemTools::FileExists(toplevelDirectory)) {
     if (cmSystemTools::FileExists(toplevelDirectory)) {
@@ -1028,8 +1027,7 @@ int cmCPackGenerator::DoPackage()
                   "Remove old package file" << std::endl);
                   "Remove old package file" << std::endl);
     cmSystemTools::RemoveFile(tempPackageFileName);
     cmSystemTools::RemoveFile(tempPackageFileName);
   }
   }
-  if (cmSystemTools::IsOn(
-        this->GetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))) {
+  if (cmIsOn(this->GetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))) {
     tempDirectory = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
     tempDirectory = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
   }
   }
 
 
@@ -1153,14 +1151,14 @@ bool cmCPackGenerator::IsSet(const std::string& name) const
 
 
 bool cmCPackGenerator::IsOn(const std::string& name) const
 bool cmCPackGenerator::IsOn(const std::string& name) const
 {
 {
-  return cmSystemTools::IsOn(GetOption(name));
+  return cmIsOn(GetOption(name));
 }
 }
 
 
 bool cmCPackGenerator::IsSetToOff(const std::string& op) const
 bool cmCPackGenerator::IsSetToOff(const std::string& op) const
 {
 {
   const char* ret = this->MakefileMap->GetDefinition(op);
   const char* ret = this->MakefileMap->GetDefinition(op);
   if (ret && *ret) {
   if (ret && *ret) {
-    return cmSystemTools::IsOff(ret);
+    return cmIsOff(ret);
   }
   }
   return false;
   return false;
 }
 }
@@ -1474,7 +1472,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
     component->IsRequired = this->IsOn(macroPrefix + "_REQUIRED");
     component->IsRequired = this->IsOn(macroPrefix + "_REQUIRED");
     component->IsDisabledByDefault = this->IsOn(macroPrefix + "_DISABLED");
     component->IsDisabledByDefault = this->IsOn(macroPrefix + "_DISABLED");
     component->IsDownloaded = this->IsOn(macroPrefix + "_DOWNLOADED") ||
     component->IsDownloaded = this->IsOn(macroPrefix + "_DOWNLOADED") ||
-      cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
+      cmIsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
 
 
     const char* archiveFile = this->GetOption(macroPrefix + "_ARCHIVE_FILE");
     const char* archiveFile = this->GetOption(macroPrefix + "_ARCHIVE_FILE");
     if (archiveFile && *archiveFile) {
     if (archiveFile && *archiveFile) {

+ 3 - 5
Source/CPack/cmCPackNSISGenerator.cxx

@@ -275,7 +275,7 @@ int cmCPackNSISGenerator::PackageFiles()
 
 
     if (anyDownloadedComponents) {
     if (anyDownloadedComponents) {
       defines += "!define CPACK_USES_DOWNLOAD\n";
       defines += "!define CPACK_USES_DOWNLOAD\n";
-      if (cmSystemTools::IsOn(this->GetOption("CPACK_ADD_REMOVE"))) {
+      if (cmIsOn(this->GetOption("CPACK_ADD_REMOVE"))) {
         defines += "!define CPACK_NSIS_ADD_REMOVE\n";
         defines += "!define CPACK_NSIS_ADD_REMOVE\n";
       }
       }
     }
     }
@@ -322,8 +322,7 @@ int cmCPackNSISGenerator::PackageFiles()
 
 
 int cmCPackNSISGenerator::InitializeInternal()
 int cmCPackNSISGenerator::InitializeInternal()
 {
 {
-  if (cmSystemTools::IsOn(
-        this->GetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))) {
+  if (cmIsOn(this->GetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))) {
     cmCPackLogger(
     cmCPackLogger(
       cmCPackLog::LOG_WARNING,
       cmCPackLog::LOG_WARNING,
       "NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY set. "
       "NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY set. "
@@ -721,8 +720,7 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
     // size of the installed component.
     // size of the installed component.
     std::string zipListFileName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
     std::string zipListFileName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
     zipListFileName += "/winZip.filelist";
     zipListFileName += "/winZip.filelist";
-    bool needQuotesInFile =
-      cmSystemTools::IsOn(this->GetOption("CPACK_ZIP_NEED_QUOTES"));
+    bool needQuotesInFile = cmIsOn(this->GetOption("CPACK_ZIP_NEED_QUOTES"));
     unsigned long totalSize = 0;
     unsigned long totalSize = 0;
     { // the scope is needed for cmGeneratedFileStream
     { // the scope is needed for cmGeneratedFileStream
       cmGeneratedFileStream out(zipListFileName);
       cmGeneratedFileStream out(zipListFileName);

+ 2 - 1
Source/CPack/cmCPackRPMGenerator.cxx

@@ -12,6 +12,7 @@
 #include "cmCPackComponentGroup.h"
 #include "cmCPackComponentGroup.h"
 #include "cmCPackGenerator.h"
 #include "cmCPackGenerator.h"
 #include "cmCPackLog.h"
 #include "cmCPackLog.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 cmCPackRPMGenerator::cmCPackRPMGenerator() = default;
 cmCPackRPMGenerator::cmCPackRPMGenerator() = default;
@@ -21,7 +22,7 @@ cmCPackRPMGenerator::~cmCPackRPMGenerator() = default;
 int cmCPackRPMGenerator::InitializeInternal()
 int cmCPackRPMGenerator::InitializeInternal()
 {
 {
   this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
   this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
-  if (cmSystemTools::IsOff(this->GetOption("CPACK_SET_DESTDIR"))) {
+  if (cmIsOff(this->GetOption("CPACK_SET_DESTDIR"))) {
     this->SetOption("CPACK_SET_DESTDIR", "I_ON");
     this->SetOption("CPACK_SET_DESTDIR", "I_ON");
   }
   }
   /* Replace space in CPACK_PACKAGE_NAME in order to avoid
   /* Replace space in CPACK_PACKAGE_NAME in order to avoid

+ 1 - 1
Source/CTest/cmCTestBuildHandler.cxx

@@ -326,7 +326,7 @@ int cmCTestBuildHandler::ProcessHandler()
 
 
   std::string const& useLaunchers =
   std::string const& useLaunchers =
     this->CTest->GetCTestConfiguration("UseLaunchers");
     this->CTest->GetCTestConfiguration("UseLaunchers");
-  this->UseCTestLaunch = cmSystemTools::IsOn(useLaunchers);
+  this->UseCTestLaunch = cmIsOn(useLaunchers);
 
 
   // Create a last build log
   // Create a last build log
   cmGeneratedFileStream ofs;
   cmGeneratedFileStream ofs;

+ 1 - 1
Source/CTest/cmCTestGIT.cxx

@@ -270,7 +270,7 @@ bool cmCTestGIT::UpdateImpl()
 
 
   std::string init_submodules =
   std::string init_submodules =
     this->CTest->GetCTestConfiguration("GITInitSubmodules");
     this->CTest->GetCTestConfiguration("GITInitSubmodules");
-  if (cmSystemTools::IsOn(init_submodules)) {
+  if (cmIsOn(init_submodules)) {
     char const* git_submodule_init[] = { git, "submodule", "init", nullptr };
     char const* git_submodule_init[] = { git, "submodule", "init", nullptr };
     ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
     ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
                          top_dir.c_str());
                          top_dir.c_str());

+ 2 - 2
Source/CTest/cmCTestSubmitHandler.cxx

@@ -280,7 +280,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
 
 
       upload_as += "&MD5=";
       upload_as += "&MD5=";
 
 
-      if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) {
+      if (cmIsOn(this->GetOption("InternalTest"))) {
         upload_as += "bad_md5sum";
         upload_as += "bad_md5sum";
       } else {
       } else {
         upload_as +=
         upload_as +=
@@ -517,7 +517,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
                "Only http and https are supported for CDASH_UPLOAD\n");
                "Only http and https are supported for CDASH_UPLOAD\n");
     return -1;
     return -1;
   }
   }
-  bool internalTest = cmSystemTools::IsOn(this->GetOption("InternalTest"));
+  bool internalTest = cmIsOn(this->GetOption("InternalTest"));
 
 
   // Get RETRY_COUNT and RETRY_DELAY values if they were set.
   // Get RETRY_COUNT and RETRY_DELAY values if they were set.
   std::string retryDelayString = this->GetOption("RetryDelay") == nullptr
   std::string retryDelayString = this->GetOption("RetryDelay") == nullptr

+ 7 - 7
Source/CTest/cmCTestTestHandler.cxx

@@ -512,8 +512,8 @@ bool cmCTestTestHandler::ProcessOptions()
 {
 {
   // Update internal data structure from generic one
   // Update internal data structure from generic one
   this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation"));
   this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation"));
-  this->SetUseUnion(cmSystemTools::IsOn(this->GetOption("UseUnion")));
-  if (cmSystemTools::IsOn(this->GetOption("ScheduleRandom"))) {
+  this->SetUseUnion(cmIsOn(this->GetOption("UseUnion")));
+  if (cmIsOn(this->GetOption("ScheduleRandom"))) {
     this->CTest->SetScheduleType("Random");
     this->CTest->SetScheduleType("Random");
   }
   }
   if (this->GetOption("ParallelLevel")) {
   if (this->GetOption("ParallelLevel")) {
@@ -553,7 +553,7 @@ bool cmCTestTestHandler::ProcessOptions()
   if (val) {
   if (val) {
     this->ExcludeFixtureCleanupRegExp = val;
     this->ExcludeFixtureCleanupRegExp = val;
   }
   }
-  this->SetRerunFailed(cmSystemTools::IsOn(this->GetOption("RerunFailed")));
+  this->SetRerunFailed(cmIsOn(this->GetOption("RerunFailed")));
 
 
   return true;
   return true;
 }
 }
@@ -2203,10 +2203,10 @@ bool cmCTestTestHandler::SetTestsProperties(
             }
             }
           }
           }
           if (key == "WILL_FAIL") {
           if (key == "WILL_FAIL") {
-            rt.WillFail = cmSystemTools::IsOn(val);
+            rt.WillFail = cmIsOn(val);
           }
           }
           if (key == "DISABLED") {
           if (key == "DISABLED") {
-            rt.Disabled = cmSystemTools::IsOn(val);
+            rt.Disabled = cmIsOn(val);
           }
           }
           if (key == "ATTACHED_FILES") {
           if (key == "ATTACHED_FILES") {
             cmExpandList(val, rt.AttachedFiles);
             cmExpandList(val, rt.AttachedFiles);
@@ -2249,7 +2249,7 @@ bool cmCTestTestHandler::SetTestsProperties(
             cmExpandList(val, rt.RequiredFiles);
             cmExpandList(val, rt.RequiredFiles);
           }
           }
           if (key == "RUN_SERIAL") {
           if (key == "RUN_SERIAL") {
-            rt.RunSerial = cmSystemTools::IsOn(val);
+            rt.RunSerial = cmIsOn(val);
           }
           }
           if (key == "FAIL_REGULAR_EXPRESSION") {
           if (key == "FAIL_REGULAR_EXPRESSION") {
             std::vector<std::string> lval;
             std::vector<std::string> lval;
@@ -2272,7 +2272,7 @@ bool cmCTestTestHandler::SetTestsProperties(
             }
             }
           }
           }
           if (key == "PROCESSOR_AFFINITY") {
           if (key == "PROCESSOR_AFFINITY") {
-            rt.WantAffinity = cmSystemTools::IsOn(val);
+            rt.WantAffinity = cmIsOn(val);
           }
           }
           if (key == "SKIP_RETURN_CODE") {
           if (key == "SKIP_RETURN_CODE") {
             rt.SkipReturnCode = atoi(val.c_str());
             rt.SkipReturnCode = atoi(val.c_str());

+ 2 - 2
Source/CTest/cmCTestVC.cxx

@@ -3,6 +3,7 @@
 #include "cmCTestVC.h"
 #include "cmCTestVC.h"
 
 
 #include "cmCTest.h"
 #include "cmCTest.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 #include "cmXMLWriter.h"
 #include "cmXMLWriter.h"
 
 
@@ -152,8 +153,7 @@ bool cmCTestVC::Update()
 
 
   // if update version only is on then do not actually update,
   // if update version only is on then do not actually update,
   // just note the current version and finish
   // just note the current version and finish
-  if (!cmSystemTools::IsOn(
-        this->CTest->GetCTestConfiguration("UpdateVersionOnly"))) {
+  if (!cmIsOn(this->CTest->GetCTestConfiguration("UpdateVersionOnly"))) {
     result = this->NoteOldRevision() && result;
     result = this->NoteOldRevision() && result;
     this->Log << "--- Begin Update ---\n";
     this->Log << "--- Begin Update ---\n";
     result = this->UpdateImpl() && result;
     result = this->UpdateImpl() && result;

+ 1 - 1
Source/CursesDialog/cmCursesCacheEntryComposite.cxx

@@ -50,7 +50,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
   switch (cm->GetState()->GetCacheEntryType(key)) {
   switch (cm->GetState()->GetCacheEntryType(key)) {
     case cmStateEnums::BOOL:
     case cmStateEnums::BOOL:
       this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
       this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
-      if (cmSystemTools::IsOn(value)) {
+      if (cmIsOn(value)) {
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
       } else {
       } else {
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);

+ 2 - 1
Source/CursesDialog/cmCursesMainForm.cxx

@@ -13,6 +13,7 @@
 #include "cmCursesWidget.h"
 #include "cmCursesWidget.h"
 #include "cmState.h"
 #include "cmState.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 #include "cmVersion.h"
 #include "cmVersion.h"
 #include "cmake.h"
 #include "cmake.h"
@@ -696,7 +697,7 @@ void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type,
     cmSystemTools::ConvertToUnixSlashes(out);
     cmSystemTools::ConvertToUnixSlashes(out);
   }
   }
   if (type == cmStateEnums::BOOL) {
   if (type == cmStateEnums::BOOL) {
-    if (cmSystemTools::IsOff(out)) {
+    if (cmIsOff(out)) {
       out = "OFF";
       out = "OFF";
     } else {
     } else {
       out = "ON";
       out = "ON";

+ 2 - 1
Source/QtDialog/QCMake.cxx

@@ -7,6 +7,7 @@
 
 
 #include "cmExternalMakefileProjectGenerator.h"
 #include "cmExternalMakefileProjectGenerator.h"
 #include "cmState.h"
 #include "cmState.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 #ifdef Q_OS_WIN
 #ifdef Q_OS_WIN
@@ -312,7 +313,7 @@ QCMakePropertyList QCMake::properties() const
     prop.Advanced = state->GetCacheEntryPropertyAsBool(key, "ADVANCED");
     prop.Advanced = state->GetCacheEntryPropertyAsBool(key, "ADVANCED");
     if (t == cmStateEnums::BOOL) {
     if (t == cmStateEnums::BOOL) {
       prop.Type = QCMakeProperty::BOOL;
       prop.Type = QCMakeProperty::BOOL;
-      prop.Value = cmSystemTools::IsOn(cachedValue);
+      prop.Value = cmIsOn(cachedValue);
     } else if (t == cmStateEnums::PATH) {
     } else if (t == cmStateEnums::PATH) {
       prop.Type = QCMakeProperty::PATH;
       prop.Type = QCMakeProperty::PATH;
     } else if (t == cmStateEnums::FILEPATH) {
     } else if (t == cmStateEnums::FILEPATH) {

+ 2 - 2
Source/cmAddLibraryCommand.cxx

@@ -12,7 +12,7 @@
 #include "cmMessageType.h"
 #include "cmMessageType.h"
 #include "cmState.h"
 #include "cmState.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
-#include "cmSystemTools.h"
+#include "cmStringAlgorithms.h"
 #include "cmTarget.h"
 #include "cmTarget.h"
 
 
 bool cmAddLibraryCommand(std::vector<std::string> const& args,
 bool cmAddLibraryCommand(std::vector<std::string> const& args,
@@ -27,7 +27,7 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
   // Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
   // Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
   // otherwise it defaults to static library.
   // otherwise it defaults to static library.
   cmStateEnums::TargetType type = cmStateEnums::SHARED_LIBRARY;
   cmStateEnums::TargetType type = cmStateEnums::SHARED_LIBRARY;
-  if (cmSystemTools::IsOff(mf.GetDefinition("BUILD_SHARED_LIBS"))) {
+  if (cmIsOff(mf.GetDefinition("BUILD_SHARED_LIBS"))) {
     type = cmStateEnums::STATIC_LIBRARY;
     type = cmStateEnums::STATIC_LIBRARY;
   }
   }
   bool excludeFromAll = false;
   bool excludeFromAll = false;

+ 1 - 1
Source/cmCPluginAPI.cxx

@@ -608,7 +608,7 @@ int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop)
   if (cmSourceFile* rsf = sf->RealSourceFile) {
   if (cmSourceFile* rsf = sf->RealSourceFile) {
     return rsf->GetPropertyAsBool(prop) ? 1 : 0;
     return rsf->GetPropertyAsBool(prop) ? 1 : 0;
   }
   }
-  return cmSystemTools::IsOn(cmSourceFileGetProperty(arg, prop)) ? 1 : 0;
+  return cmIsOn(cmSourceFileGetProperty(arg, prop)) ? 1 : 0;
 }
 }
 
 
 void CCONV cmSourceFileSetProperty(void* arg, const char* prop,
 void CCONV cmSourceFileSetProperty(void* arg, const char* prop,

+ 4 - 5
Source/cmCTest.cxx

@@ -323,12 +323,11 @@ cmCTest::cmCTest()
 {
 {
   std::string envValue;
   std::string envValue;
   if (cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE", envValue)) {
   if (cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE", envValue)) {
-    this->Impl->OutputTestOutputOnTestFailure =
-      !cmSystemTools::IsOff(envValue);
+    this->Impl->OutputTestOutputOnTestFailure = !cmIsOff(envValue);
   }
   }
   envValue.clear();
   envValue.clear();
   if (cmSystemTools::GetEnv("CTEST_PROGRESS_OUTPUT", envValue)) {
   if (cmSystemTools::GetEnv("CTEST_PROGRESS_OUTPUT", envValue)) {
-    this->Impl->TestProgressOutput = !cmSystemTools::IsOff(envValue);
+    this->Impl->TestProgressOutput = !cmIsOff(envValue);
   }
   }
 
 
   this->Impl->Parts[PartStart].SetName("Start");
   this->Impl->Parts[PartStart].SetName("Start");
@@ -763,7 +762,7 @@ bool cmCTest::UpdateCTestConfiguration()
   }
   }
   if (this->Impl->ProduceXML) {
   if (this->Impl->ProduceXML) {
     this->Impl->CompressXMLFiles =
     this->Impl->CompressXMLFiles =
-      cmSystemTools::IsOn(this->GetCTestConfiguration("CompressSubmission"));
+      cmIsOn(this->GetCTestConfiguration("CompressSubmission"));
   }
   }
   return true;
   return true;
 }
 }
@@ -2001,7 +2000,7 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
   if (this->CheckArgument(arg, "--interactive-debug-mode") &&
   if (this->CheckArgument(arg, "--interactive-debug-mode") &&
       i < args.size() - 1) {
       i < args.size() - 1) {
     i++;
     i++;
-    this->Impl->InteractiveDebugMode = cmSystemTools::IsOn(args[i]);
+    this->Impl->InteractiveDebugMode = cmIsOn(args[i]);
   }
   }
   if (this->CheckArgument(arg, "--submit-index") && i < args.size() - 1) {
   if (this->CheckArgument(arg, "--submit-index") && i < args.size() - 1) {
     i++;
     i++;

+ 2 - 2
Source/cmCacheManager.cxx

@@ -616,7 +616,7 @@ void cmCacheManager::CacheIterator::SetValue(const char* value)
 
 
 bool cmCacheManager::CacheIterator::GetValueAsBool() const
 bool cmCacheManager::CacheIterator::GetValueAsBool() const
 {
 {
-  return cmSystemTools::IsOn(this->GetEntry().Value);
+  return cmIsOn(this->GetEntry().Value);
 }
 }
 
 
 std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const
 std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const
@@ -696,7 +696,7 @@ bool cmCacheManager::CacheIterator::GetPropertyAsBool(
   const std::string& prop) const
   const std::string& prop) const
 {
 {
   if (const char* value = this->GetProperty(prop)) {
   if (const char* value = this->GetProperty(prop)) {
-    return cmSystemTools::IsOn(value);
+    return cmIsOn(value);
   }
   }
   return false;
   return false;
 }
 }

+ 2 - 2
Source/cmComputeLinkInformation.cxx

@@ -480,7 +480,7 @@ bool cmComputeLinkInformation::Compute()
   // Restore the target link type so the correct system runtime
   // Restore the target link type so the correct system runtime
   // libraries are found.
   // libraries are found.
   const char* lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC");
   const char* lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC");
-  if (cmSystemTools::IsOn(lss)) {
+  if (cmIsOn(lss)) {
     this->SetCurrentLinkType(LinkStatic);
     this->SetCurrentLinkType(LinkStatic);
   } else {
   } else {
     this->SetCurrentLinkType(this->StartLinkType);
     this->SetCurrentLinkType(this->StartLinkType);
@@ -787,7 +787,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
 
 
   // Lookup the starting link type from the target (linked statically?).
   // Lookup the starting link type from the target (linked statically?).
   const char* lss = this->Target->GetProperty("LINK_SEARCH_START_STATIC");
   const char* lss = this->Target->GetProperty("LINK_SEARCH_START_STATIC");
-  this->StartLinkType = cmSystemTools::IsOn(lss) ? LinkStatic : LinkShared;
+  this->StartLinkType = cmIsOn(lss) ? LinkStatic : LinkShared;
   this->CurrentLinkType = this->StartLinkType;
   this->CurrentLinkType = this->StartLinkType;
 }
 }
 
 

+ 5 - 5
Source/cmConditionEvaluator.cxx

@@ -220,10 +220,10 @@ bool cmConditionEvaluator::GetBooleanValue(
   }
   }
 
 
   // Check named constants.
   // Check named constants.
-  if (cmSystemTools::IsOn(arg.c_str())) {
+  if (cmIsOn(arg.GetValue())) {
     return true;
     return true;
   }
   }
-  if (cmSystemTools::IsOff(arg.c_str())) {
+  if (cmIsOff(arg.GetValue())) {
     return false;
     return false;
   }
   }
 
 
@@ -239,7 +239,7 @@ bool cmConditionEvaluator::GetBooleanValue(
 
 
   // Check definition.
   // Check definition.
   const char* def = this->GetDefinitionIfUnquoted(arg);
   const char* def = this->GetDefinitionIfUnquoted(arg);
-  return !cmSystemTools::IsOff(def);
+  return !cmIsOff(def);
 }
 }
 
 
 //=========================================================================
 //=========================================================================
@@ -256,14 +256,14 @@ bool cmConditionEvaluator::GetBooleanValueOld(
       return true;
       return true;
     }
     }
     const char* def = this->GetDefinitionIfUnquoted(arg);
     const char* def = this->GetDefinitionIfUnquoted(arg);
-    return !cmSystemTools::IsOff(def);
+    return !cmIsOff(def);
   }
   }
   // Old GetVariableOrNumber behavior.
   // Old GetVariableOrNumber behavior.
   const char* def = this->GetDefinitionIfUnquoted(arg);
   const char* def = this->GetDefinitionIfUnquoted(arg);
   if (!def && atoi(arg.c_str())) {
   if (!def && atoi(arg.c_str())) {
     def = arg.c_str();
     def = arg.c_str();
   }
   }
-  return !cmSystemTools::IsOff(def);
+  return !cmIsOff(def);
 }
 }
 
 
 //=========================================================================
 //=========================================================================

+ 2 - 2
Source/cmExtraCodeBlocksGenerator.cxx

@@ -235,7 +235,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
       // Also we can disable external (outside the project) files by setting ON
       // Also we can disable external (outside the project) files by setting ON
       // CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable.
       // CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable.
       const bool excludeExternal =
       const bool excludeExternal =
-        cmSystemTools::IsOn(it.second[0]->GetMakefile()->GetSafeDefinition(
+        cmIsOn(it.second[0]->GetMakefile()->GetSafeDefinition(
           "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
           "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
       if (!splitted.empty() &&
       if (!splitted.empty() &&
           (!excludeExternal || (relative.find("..") == std::string::npos)) &&
           (!excludeExternal || (relative.find("..") == std::string::npos)) &&
@@ -381,7 +381,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
             // Do not add this file if it has ".." in relative path and
             // Do not add this file if it has ".." in relative path and
             // if CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable is on.
             // if CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable is on.
             const bool excludeExternal =
             const bool excludeExternal =
-              cmSystemTools::IsOn(lg->GetMakefile()->GetSafeDefinition(
+              cmIsOn(lg->GetMakefile()->GetSafeDefinition(
                 "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
                 "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
             if (excludeExternal &&
             if (excludeExternal &&
                 (relative.find("..") != std::string::npos)) {
                 (relative.find("..") != std::string::npos)) {

+ 1 - 1
Source/cmExtraSublimeTextGenerator.cxx

@@ -445,7 +445,7 @@ bool cmExtraSublimeTextGenerator::Open(const std::string& bindir,
   if (!sublExecutable) {
   if (!sublExecutable) {
     return false;
     return false;
   }
   }
-  if (cmSystemTools::IsNOTFOUND(sublExecutable)) {
+  if (cmIsNOTFOUND(sublExecutable)) {
     return false;
     return false;
   }
   }
 
 

+ 3 - 3
Source/cmFileCommand.cxx

@@ -703,10 +703,10 @@ bool HandleGlobImpl(std::vector<std::string> const& args, bool recurse,
     if (*i == "LIST_DIRECTORIES") {
     if (*i == "LIST_DIRECTORIES") {
       ++i; // skip LIST_DIRECTORIES
       ++i; // skip LIST_DIRECTORIES
       if (i != args.end()) {
       if (i != args.end()) {
-        if (cmSystemTools::IsOn(*i)) {
+        if (cmIsOn(*i)) {
           g.SetListDirs(true);
           g.SetListDirs(true);
           g.SetRecurseListDirs(true);
           g.SetRecurseListDirs(true);
-        } else if (cmSystemTools::IsOff(*i)) {
+        } else if (cmIsOff(*i)) {
           g.SetListDirs(false);
           g.SetListDirs(false);
           g.SetRecurseListDirs(false);
           g.SetRecurseListDirs(false);
         } else {
         } else {
@@ -1656,7 +1656,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
     } else if (*i == "TLS_VERIFY") {
     } else if (*i == "TLS_VERIFY") {
       ++i;
       ++i;
       if (i != args.end()) {
       if (i != args.end()) {
-        tls_verify = cmSystemTools::IsOn(*i);
+        tls_verify = cmIsOn(*i);
       } else {
       } else {
         status.SetError("TLS_VERIFY missing bool value.");
         status.SetError("TLS_VERIFY missing bool value.");
         return false;
         return false;

+ 2 - 1
Source/cmFileInstaller.cxx

@@ -6,6 +6,7 @@
 #include "cmExecutionStatus.h"
 #include "cmExecutionStatus.h"
 #include "cmFSPermissions.h"
 #include "cmFSPermissions.h"
 #include "cmMakefile.h"
 #include "cmMakefile.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 #include "cm_sys_stat.h"
 #include "cm_sys_stat.h"
@@ -28,7 +29,7 @@ cmFileInstaller::cmFileInstaller(cmExecutionStatus& status)
   // Check whether to copy files always or only if they have changed.
   // Check whether to copy files always or only if they have changed.
   std::string install_always;
   std::string install_always;
   if (cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS", install_always)) {
   if (cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS", install_always)) {
-    this->Always = cmSystemTools::IsOn(install_always);
+    this->Always = cmIsOn(install_always);
   }
   }
   // Get the current manifest.
   // Get the current manifest.
   this->Manifest =
   this->Manifest =

+ 1 - 1
Source/cmFindBase.cxx

@@ -324,7 +324,7 @@ bool cmFindBase::CheckForVariableInCache()
         this->Makefile->GetDefinition(this->VariableName)) {
         this->Makefile->GetDefinition(this->VariableName)) {
     cmState* state = this->Makefile->GetState();
     cmState* state = this->Makefile->GetState();
     const char* cacheEntry = state->GetCacheEntryValue(this->VariableName);
     const char* cacheEntry = state->GetCacheEntryValue(this->VariableName);
-    bool found = !cmSystemTools::IsNOTFOUND(cacheValue);
+    bool found = !cmIsNOTFOUND(cacheValue);
     bool cached = cacheEntry != nullptr;
     bool cached = cacheEntry != nullptr;
     if (found) {
     if (found) {
       // If the user specifies the entry on the command line without a
       // If the user specifies the entry on the command line without a

+ 1 - 1
Source/cmFindCommon.cxx

@@ -161,7 +161,7 @@ void cmFindCommon::SelectDefaultSearchModes()
   for (auto& path : search_paths) {
   for (auto& path : search_paths) {
     const char* def = this->Makefile->GetDefinition(path.second);
     const char* def = this->Makefile->GetDefinition(path.second);
     if (def) {
     if (def) {
-      path.first = !cmSystemTools::IsOn(def);
+      path.first = !cmIsOn(def);
     }
     }
   }
   }
 }
 }

+ 4 - 5
Source/cmFindPackageCommand.cxx

@@ -194,7 +194,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
   // priority over the deprecated CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
   // priority over the deprecated CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
   if (const char* def =
   if (const char* def =
         this->Makefile->GetDefinition("CMAKE_FIND_USE_PACKAGE_REGISTRY")) {
         this->Makefile->GetDefinition("CMAKE_FIND_USE_PACKAGE_REGISTRY")) {
-    this->NoUserRegistry = !cmSystemTools::IsOn(def);
+    this->NoUserRegistry = !cmIsOn(def);
   } else if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY")) {
   } else if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY")) {
     this->NoUserRegistry = true;
     this->NoUserRegistry = true;
   }
   }
@@ -752,7 +752,7 @@ bool cmFindPackageCommand::HandlePackageMode(
   // Try to load the config file if the directory is known
   // Try to load the config file if the directory is known
   bool fileFound = false;
   bool fileFound = false;
   if (this->UseConfigFiles) {
   if (this->UseConfigFiles) {
-    if (!cmSystemTools::IsOff(def)) {
+    if (!cmIsOff(def)) {
       // Get the directory from the variable value.
       // Get the directory from the variable value.
       std::string dir = def;
       std::string dir = def;
       cmSystemTools::ConvertToUnixSlashes(dir);
       cmSystemTools::ConvertToUnixSlashes(dir);
@@ -772,7 +772,7 @@ bool cmFindPackageCommand::HandlePackageMode(
     }
     }
 
 
     // Search for the config file if it is not already found.
     // Search for the config file if it is not already found.
-    if (cmSystemTools::IsOff(def) || !fileFound) {
+    if (cmIsOff(def) || !fileFound) {
       fileFound = this->FindConfig();
       fileFound = this->FindConfig();
     }
     }
 
 
@@ -1148,8 +1148,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
 
 
   const char* upperResult = this->Makefile->GetDefinition(upperFound);
   const char* upperResult = this->Makefile->GetDefinition(upperFound);
   const char* result = this->Makefile->GetDefinition(found);
   const char* result = this->Makefile->GetDefinition(found);
-  bool packageFound =
-    ((cmSystemTools::IsOn(result)) || (cmSystemTools::IsOn(upperResult)));
+  bool packageFound = ((cmIsOn(result)) || (cmIsOn(upperResult)));
 
 
   this->AppendToFoundProperty(packageFound);
   this->AppendToFoundProperty(packageFound);
 
 

+ 1 - 1
Source/cmGeneratorExpressionNode.cxx

@@ -169,7 +169,7 @@ static const struct BoolNode : public cmGeneratorExpressionNode
     const GeneratorExpressionContent* /*content*/,
     const GeneratorExpressionContent* /*content*/,
     cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
     cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
   {
   {
-    return !cmSystemTools::IsOff(parameters.front()) ? "1" : "0";
+    return !cmIsOff(parameters.front()) ? "1" : "0";
   }
   }
 } boolNode;
 } boolNode;
 
 

+ 8 - 8
Source/cmGeneratorTarget.cxx

@@ -825,7 +825,7 @@ bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang,
                                      std::string const& config) const
                                      std::string const& config) const
 {
 {
   const char* feature = "INTERPROCEDURAL_OPTIMIZATION";
   const char* feature = "INTERPROCEDURAL_OPTIMIZATION";
-  const bool result = cmSystemTools::IsOn(this->GetFeature(feature, config));
+  const bool result = cmIsOn(this->GetFeature(feature, config));
 
 
   if (!result) {
   if (!result) {
     // 'INTERPROCEDURAL_OPTIMIZATION' is off, no need to check policies
     // 'INTERPROCEDURAL_OPTIMIZATION' is off, no need to check policies
@@ -1972,7 +1972,7 @@ bool cmGeneratorTarget::MacOSXUseInstallNameDir() const
   const char* build_with_install_name =
   const char* build_with_install_name =
     this->GetProperty("BUILD_WITH_INSTALL_NAME_DIR");
     this->GetProperty("BUILD_WITH_INSTALL_NAME_DIR");
   if (build_with_install_name) {
   if (build_with_install_name) {
-    return cmSystemTools::IsOn(build_with_install_name);
+    return cmIsOn(build_with_install_name);
   }
   }
 
 
   cmPolicies::PolicyStatus cmp0068 = this->GetPolicyStatusCMP0068();
   cmPolicies::PolicyStatus cmp0068 = this->GetPolicyStatusCMP0068();
@@ -3033,7 +3033,7 @@ void processIncludeDirectories(
         }
         }
       }
       }
 
 
-      if (!cmSystemTools::IsOff(entryInclude)) {
+      if (!cmIsOff(entryInclude)) {
         cmSystemTools::ConvertToUnixSlashes(entryInclude);
         cmSystemTools::ConvertToUnixSlashes(entryInclude);
       }
       }
 
 
@@ -4608,7 +4608,7 @@ bool getTypedProperty<bool>(cmGeneratorTarget const* tgt,
   }
   }
 
 
   const char* value = tgt->GetProperty(prop);
   const char* value = tgt->GetProperty(prop);
-  return cmSystemTools::IsOn(genexInterpreter->Evaluate(value, prop));
+  return cmIsOn(genexInterpreter->Evaluate(value, prop));
 }
 }
 
 
 template <>
 template <>
@@ -4726,7 +4726,7 @@ std::pair<bool, const char*> consistentProperty(const char* lhs,
 
 
   switch (t) {
   switch (t) {
     case BoolType: {
     case BoolType: {
-      bool same = cmSystemTools::IsOn(lhs) == cmSystemTools::IsOn(rhs);
+      bool same = cmIsOn(lhs) == cmIsOn(rhs);
       return std::make_pair(same, same ? lhs : nullptr);
       return std::make_pair(same, same ? lhs : nullptr);
     }
     }
     case StringType:
     case StringType:
@@ -4757,7 +4757,7 @@ std::pair<bool, std::string> consistentProperty(const std::string& lhs,
 
 
   switch (t) {
   switch (t) {
     case BoolType: {
     case BoolType: {
-      bool same = cmSystemTools::IsOn(lhs) == cmSystemTools::IsOn(rhs);
+      bool same = cmIsOn(lhs) == cmIsOn(rhs);
       return std::make_pair(same, same ? lhs : null_ptr);
       return std::make_pair(same, same ? lhs : null_ptr);
     }
     }
     case StringType:
     case StringType:
@@ -5868,10 +5868,10 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config,
     std::string soProp = "IMPORTED_NO_SONAME";
     std::string soProp = "IMPORTED_NO_SONAME";
     soProp += suffix;
     soProp += suffix;
     if (const char* config_no_soname = this->GetProperty(soProp)) {
     if (const char* config_no_soname = this->GetProperty(soProp)) {
-      info.NoSOName = cmSystemTools::IsOn(config_no_soname);
+      info.NoSOName = cmIsOn(config_no_soname);
     } else if (const char* no_soname =
     } else if (const char* no_soname =
                  this->GetProperty("IMPORTED_NO_SONAME")) {
                  this->GetProperty("IMPORTED_NO_SONAME")) {
-      info.NoSOName = cmSystemTools::IsOn(no_soname);
+      info.NoSOName = cmIsOn(no_soname);
     }
     }
   }
   }
 
 

+ 1 - 1
Source/cmGetFilenameComponentCommand.cxx

@@ -22,7 +22,7 @@ bool cmGetFilenameComponentCommand::InitialPass(
   // already, if so use that value
   // already, if so use that value
   if (args.size() >= 4 && args.back() == "CACHE") {
   if (args.size() >= 4 && args.back() == "CACHE") {
     const char* cacheValue = this->Makefile->GetDefinition(args.front());
     const char* cacheValue = this->Makefile->GetDefinition(args.front());
-    if (cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue)) {
+    if (cacheValue && !cmIsNOTFOUND(cacheValue)) {
       return true;
       return true;
     }
     }
   }
   }

+ 3 - 6
Source/cmGhsMultiTargetGenerator.cxx

@@ -561,10 +561,8 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
   for (auto& sg : groupFilesList) {
   for (auto& sg : groupFilesList) {
     std::ostream* fout;
     std::ostream* fout;
     bool useProjectFile =
     bool useProjectFile =
-      cmSystemTools::IsOn(
-        this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE")) ||
-      cmSystemTools::IsOn(
-        this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"));
+      cmIsOn(this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE")) ||
+      cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"));
     if (useProjectFile || sg.empty()) {
     if (useProjectFile || sg.empty()) {
       fout = &fout_proj;
       fout = &fout_proj;
     } else {
     } else {
@@ -740,8 +738,7 @@ bool cmGhsMultiTargetGenerator::DetermineIfIntegrityApp()
 {
 {
   const char* p = this->GeneratorTarget->GetProperty("ghs_integrity_app");
   const char* p = this->GeneratorTarget->GetProperty("ghs_integrity_app");
   if (p) {
   if (p) {
-    return cmSystemTools::IsOn(
-      this->GeneratorTarget->GetProperty("ghs_integrity_app"));
+    return cmIsOn(this->GeneratorTarget->GetProperty("ghs_integrity_app"));
   }
   }
   std::vector<cmSourceFile*> sources;
   std::vector<cmSourceFile*> sources;
   this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName);
   this->GeneratorTarget->GetSourceFiles(sources, this->ConfigName);

+ 12 - 14
Source/cmGlobalGenerator.cxx

@@ -186,15 +186,15 @@ std::string cmGlobalGenerator::SelectMakeProgram(
   const std::string& inMakeProgram, const std::string& makeDefault) const
   const std::string& inMakeProgram, const std::string& makeDefault) const
 {
 {
   std::string makeProgram = inMakeProgram;
   std::string makeProgram = inMakeProgram;
-  if (cmSystemTools::IsOff(makeProgram)) {
+  if (cmIsOff(makeProgram)) {
     const char* makeProgramCSTR =
     const char* makeProgramCSTR =
       this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
       this->CMakeInstance->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
-    if (cmSystemTools::IsOff(makeProgramCSTR)) {
+    if (cmIsOff(makeProgramCSTR)) {
       makeProgram = makeDefault;
       makeProgram = makeDefault;
     } else {
     } else {
       makeProgram = makeProgramCSTR;
       makeProgram = makeProgramCSTR;
     }
     }
-    if (cmSystemTools::IsOff(makeProgram) && !makeProgram.empty()) {
+    if (cmIsOff(makeProgram) && !makeProgram.empty()) {
       makeProgram = "CMAKE_MAKE_PROGRAM-NOTFOUND";
       makeProgram = "CMAKE_MAKE_PROGRAM-NOTFOUND";
     }
     }
   }
   }
@@ -300,7 +300,7 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const
       if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
       if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
           target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
           target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
           target->GetType() == cmStateEnums::TargetType::UTILITY ||
           target->GetType() == cmStateEnums::TargetType::UTILITY ||
-          cmSystemTools::IsOn(target->GetProperty("ghs_integrity_app"))) {
+          cmIsOn(target->GetProperty("ghs_integrity_app"))) {
         continue;
         continue;
       }
       }
 
 
@@ -382,14 +382,14 @@ bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
     return false;
     return false;
   }
   }
   if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
   if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
-      cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+      cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
     std::string setMakeProgram = mf->GetModulesFile(this->FindMakeProgramFile);
     std::string setMakeProgram = mf->GetModulesFile(this->FindMakeProgramFile);
     if (!setMakeProgram.empty()) {
     if (!setMakeProgram.empty()) {
       mf->ReadListFile(setMakeProgram);
       mf->ReadListFile(setMakeProgram);
     }
     }
   }
   }
   if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
   if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
-      cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+      cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
     std::ostringstream err;
     std::ostringstream err;
     err << "CMake was unable to find a build program corresponding to \""
     err << "CMake was unable to find a build program corresponding to \""
         << this->GetName() << "\".  CMAKE_MAKE_PROGRAM is not set.  You "
         << this->GetName() << "\".  CMAKE_MAKE_PROGRAM is not set.  You "
@@ -771,8 +771,7 @@ void cmGlobalGenerator::EnableLanguage(
     compilerEnv += "_COMPILER_ENV_VAR";
     compilerEnv += "_COMPILER_ENV_VAR";
     std::ostringstream noCompiler;
     std::ostringstream noCompiler;
     const char* compilerFile = mf->GetDefinition(compilerName);
     const char* compilerFile = mf->GetDefinition(compilerName);
-    if (!compilerFile || !*compilerFile ||
-        cmSystemTools::IsNOTFOUND(compilerFile)) {
+    if (!compilerFile || !*compilerFile || cmIsNOTFOUND(compilerFile)) {
       /* clang-format off */
       /* clang-format off */
       noCompiler <<
       noCompiler <<
         "No " << compilerName << " could be found.\n"
         "No " << compilerName << " could be found.\n"
@@ -1709,8 +1708,7 @@ void cmGlobalGenerator::CheckTargetProperties()
         continue;
         continue;
       }
       }
       for (auto const& lib : target.second.GetOriginalLinkLibraries()) {
       for (auto const& lib : target.second.GetOriginalLinkLibraries()) {
-        if (lib.first.size() > 9 &&
-            cmSystemTools::IsNOTFOUND(lib.first.c_str())) {
+        if (lib.first.size() > 9 && cmIsNOTFOUND(lib.first)) {
           std::string varName = lib.first.substr(0, lib.first.size() - 9);
           std::string varName = lib.first.substr(0, lib.first.size() - 9);
           if (state->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) {
           if (state->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) {
             varName += " (ADVANCED)";
             varName += " (ADVANCED)";
@@ -1736,7 +1734,7 @@ void cmGlobalGenerator::CheckTargetProperties()
       cmExpandList(incDirs, incs);
       cmExpandList(incDirs, incs);
 
 
       for (std::string const& incDir : incs) {
       for (std::string const& incDir : incs) {
-        if (incDir.size() > 9 && cmSystemTools::IsNOTFOUND(incDir.c_str())) {
+        if (incDir.size() > 9 && cmIsNOTFOUND(incDir)) {
           std::string varName = incDir.substr(0, incDir.size() - 9);
           std::string varName = incDir.substr(0, incDir.size() - 9);
           if (state->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) {
           if (state->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) {
             varName += " (ADVANCED)";
             varName += " (ADVANCED)";
@@ -2356,7 +2354,7 @@ void cmGlobalGenerator::AddGlobalTarget_Package(
   } else {
   } else {
     const char* noPackageAll =
     const char* noPackageAll =
       mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY");
       mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY");
-    if (!noPackageAll || cmSystemTools::IsOff(noPackageAll)) {
+    if (!noPackageAll || cmIsOff(noPackageAll)) {
       gti.Depends.emplace_back(this->GetAllTargetName());
       gti.Depends.emplace_back(this->GetAllTargetName());
     }
     }
   }
   }
@@ -2525,7 +2523,7 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
     } else {
     } else {
       const char* noall =
       const char* noall =
         mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
         mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
-      if (!noall || cmSystemTools::IsOff(noall)) {
+      if (!noall || cmIsOff(noall)) {
         gti.Depends.emplace_back(this->GetAllTargetName());
         gti.Depends.emplace_back(this->GetAllTargetName());
       }
       }
     }
     }
@@ -2608,7 +2606,7 @@ bool cmGlobalGenerator::UseFolderProperty() const
   // If this property is defined, let the setter turn this on or off...
   // If this property is defined, let the setter turn this on or off...
   //
   //
   if (prop) {
   if (prop) {
-    return cmSystemTools::IsOn(prop);
+    return cmIsOn(prop);
   }
   }
 
 
   // By default, this feature is OFF, since it is not supported in the
   // By default, this feature is OFF, since it is not supported in the

+ 7 - 10
Source/cmGlobalGhsMultiGenerator.cxx

@@ -139,8 +139,7 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p,
   /* check if OS location has been updated by platform scripts */
   /* check if OS location has been updated by platform scripts */
   std::string platform = mf->GetSafeDefinition("GHS_TARGET_PLATFORM");
   std::string platform = mf->GetSafeDefinition("GHS_TARGET_PLATFORM");
   std::string osdir = mf->GetSafeDefinition("GHS_OS_DIR");
   std::string osdir = mf->GetSafeDefinition("GHS_OS_DIR");
-  if (cmSystemTools::IsOff(osdir.c_str()) &&
-      platform.find("integrity") != std::string::npos) {
+  if (cmIsOff(osdir) && platform.find("integrity") != std::string::npos) {
     if (!this->CMakeInstance->GetIsInTryCompile()) {
     if (!this->CMakeInstance->GetIsInTryCompile()) {
       /* required OS location is not found */
       /* required OS location is not found */
       std::string m =
       std::string m =
@@ -151,8 +150,7 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p,
     }
     }
     osdir = "GHS_OS_DIR-NOT-SPECIFIED";
     osdir = "GHS_OS_DIR-NOT-SPECIFIED";
   } else if (!this->CMakeInstance->GetIsInTryCompile() &&
   } else if (!this->CMakeInstance->GetIsInTryCompile() &&
-             cmSystemTools::IsOff(this->OsDir) &&
-             !cmSystemTools::IsOff(osdir)) {
+             cmIsOff(this->OsDir) && !cmIsOff(osdir)) {
     /* OS location was updated by auto-selection */
     /* OS location was updated by auto-selection */
     std::string m = "Green Hills MULTI: GHS_OS_DIR not specified; found \"";
     std::string m = "Green Hills MULTI: GHS_OS_DIR not specified; found \"";
     m += osdir;
     m += osdir;
@@ -164,8 +162,7 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorPlatform(std::string const& p,
   // Determine GHS_BSP_NAME
   // Determine GHS_BSP_NAME
   std::string bspName = mf->GetSafeDefinition("GHS_BSP_NAME");
   std::string bspName = mf->GetSafeDefinition("GHS_BSP_NAME");
 
 
-  if (cmSystemTools::IsOff(bspName.c_str()) &&
-      platform.find("integrity") != std::string::npos) {
+  if (cmIsOff(bspName) && platform.find("integrity") != std::string::npos) {
     bspName = "sim" + arch;
     bspName = "sim" + arch;
     /* write back the calculate name for next time */
     /* write back the calculate name for next time */
     mf->AddCacheDefinition("GHS_BSP_NAME", bspName.c_str(),
     mf->AddCacheDefinition("GHS_BSP_NAME", bspName.c_str(),
@@ -335,18 +332,18 @@ void cmGlobalGhsMultiGenerator::WriteTopLevelProject(std::ostream& fout,
   // Specify BSP option if supplied by user
   // Specify BSP option if supplied by user
   const char* bspName =
   const char* bspName =
     this->GetCMakeInstance()->GetCacheDefinition("GHS_BSP_NAME");
     this->GetCMakeInstance()->GetCacheDefinition("GHS_BSP_NAME");
-  if (!cmSystemTools::IsOff(bspName)) {
+  if (!cmIsOff(bspName)) {
     fout << "    -bsp " << bspName << std::endl;
     fout << "    -bsp " << bspName << std::endl;
   }
   }
 
 
   // Specify OS DIR if supplied by user
   // Specify OS DIR if supplied by user
   // -- not all platforms require this entry in the project file
   // -- not all platforms require this entry in the project file
-  if (!cmSystemTools::IsOff(this->OsDir.c_str())) {
+  if (!cmIsOff(this->OsDir)) {
     const char* osDirOption =
     const char* osDirOption =
       this->GetCMakeInstance()->GetCacheDefinition("GHS_OS_DIR_OPTION");
       this->GetCMakeInstance()->GetCacheDefinition("GHS_OS_DIR_OPTION");
     std::replace(this->OsDir.begin(), this->OsDir.end(), '\\', '/');
     std::replace(this->OsDir.begin(), this->OsDir.end(), '\\', '/');
     fout << "    ";
     fout << "    ";
-    if (cmSystemTools::IsOff(osDirOption)) {
+    if (cmIsOff(osDirOption)) {
       fout << "";
       fout << "";
     } else {
     } else {
       fout << osDirOption;
       fout << osDirOption;
@@ -470,7 +467,7 @@ void cmGlobalGhsMultiGenerator::WriteAllTarget(
     if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
     if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
       continue;
       continue;
     }
     }
-    if (!cmSystemTools::IsOn(t->GetProperty("EXCLUDE_FROM_ALL"))) {
+    if (!cmIsOn(t->GetProperty("EXCLUDE_FROM_ALL"))) {
       defaultTargets.push_back(t);
       defaultTargets.push_back(t);
     }
     }
   }
   }

+ 2 - 1
Source/cmGlobalUnixMakefileGenerator3.cxx

@@ -22,6 +22,7 @@
 #include "cmState.h"
 #include "cmState.h"
 #include "cmStateDirectory.h"
 #include "cmStateDirectory.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 #include "cmTargetDepend.h"
 #include "cmTargetDepend.h"
 #include "cmake.h"
 #include "cmake.h"
@@ -697,7 +698,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
       if (const char* tgtMsg =
       if (const char* tgtMsg =
             this->GetCMakeInstance()->GetState()->GetGlobalProperty(
             this->GetCMakeInstance()->GetState()->GetGlobalProperty(
               "TARGET_MESSAGES")) {
               "TARGET_MESSAGES")) {
-        targetMessages = cmSystemTools::IsOn(tgtMsg);
+        targetMessages = cmIsOn(tgtMsg);
       }
       }
 
 
       if (targetMessages) {
       if (targetMessages) {

+ 2 - 3
Source/cmGlobalVisualStudio7Generator.cxx

@@ -667,8 +667,7 @@ std::set<std::string> cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
           cmGeneratorExpression ge;
           cmGeneratorExpression ge;
           std::unique_ptr<cmCompiledGeneratorExpression> cge =
           std::unique_ptr<cmCompiledGeneratorExpression> cge =
             ge.Parse(propertyValue);
             ge.Parse(propertyValue);
-          if (cmSystemTools::IsOn(
-                cge->Evaluate(target->GetLocalGenerator(), i))) {
+          if (cmIsOn(cge->Evaluate(target->GetLocalGenerator(), i))) {
             activeConfigs.insert(i);
             activeConfigs.insert(i);
           }
           }
         }
         }
@@ -684,7 +683,7 @@ std::set<std::string> cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
   for (std::string const& i : configs) {
   for (std::string const& i : configs) {
     const char* propertyValue =
     const char* propertyValue =
       target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i);
       target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i);
-    if (cmSystemTools::IsOff(propertyValue)) {
+    if (cmIsOff(propertyValue)) {
       activeConfigs.insert(i);
       activeConfigs.insert(i);
     }
     }
   }
   }

+ 1 - 1
Source/cmGlobalVisualStudio8Generator.cxx

@@ -299,7 +299,7 @@ bool cmGlobalVisualStudio8Generator::DeployInhibited(
     cmGeneratorExpression ge;
     cmGeneratorExpression ge;
     std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(propStr);
     std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(propStr);
     std::string prop = cge->Evaluate(target.LocalGenerator, config);
     std::string prop = cge->Evaluate(target.LocalGenerator, config);
-    rVal = cmSystemTools::IsOn(prop);
+    rVal = cmIsOn(prop);
   }
   }
   return rVal;
   return rVal;
 }
 }

+ 1 - 1
Source/cmGlobalVisualStudioGenerator.cxx

@@ -487,7 +487,7 @@ bool cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf)
   // Visual Studio generators know how to lookup their build tool
   // Visual Studio generators know how to lookup their build tool
   // directly instead of needing a helper module to do it, so we
   // directly instead of needing a helper module to do it, so we
   // do not actually need to put CMAKE_MAKE_PROGRAM into the cache.
   // do not actually need to put CMAKE_MAKE_PROGRAM into the cache.
-  if (cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+  if (cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
     mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetVSMakeProgram());
     mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetVSMakeProgram());
   }
   }
   return true;
   return true;

+ 3 - 4
Source/cmGlobalXCodeGenerator.cxx

@@ -240,7 +240,7 @@ bool cmGlobalXCodeGenerator::FindMakeProgram(cmMakefile* mf)
   // The Xcode generator knows how to lookup its build tool
   // The Xcode generator knows how to lookup its build tool
   // directly instead of needing a helper module to do it, so we
   // directly instead of needing a helper module to do it, so we
   // do not actually need to put CMAKE_MAKE_PROGRAM into the cache.
   // do not actually need to put CMAKE_MAKE_PROGRAM into the cache.
-  if (cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+  if (cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
     mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetXcodeBuildCommand());
     mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetXcodeBuildCommand());
   }
   }
   return true;
   return true;
@@ -1774,8 +1774,7 @@ void cmGlobalXCodeGenerator::AddPositionIndependentLinkAttribute(
   }
   }
 
 
   buildSettings->AddAttribute(
   buildSettings->AddAttribute(
-    "LD_NO_PIE",
-    this->CreateString(cmSystemTools::IsOn(PICValue) ? "NO" : "YES"));
+    "LD_NO_PIE", this->CreateString(cmIsOn(PICValue) ? "NO" : "YES"));
 }
 }
 
 
 void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
 void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
@@ -3738,7 +3737,7 @@ bool cmGlobalXCodeGenerator::UseEffectivePlatformName(cmMakefile* mf) const
     return mf->PlatformIsAppleEmbedded();
     return mf->PlatformIsAppleEmbedded();
   }
   }
 
 
-  return cmSystemTools::IsOn(epnValue);
+  return cmIsOn(epnValue);
 }
 }
 
 
 bool cmGlobalXCodeGenerator::ShouldStripResourcePath(cmMakefile*) const
 bool cmGlobalXCodeGenerator::ShouldStripResourcePath(cmMakefile*) const

+ 2 - 1
Source/cmIncludeDirectoryCommand.cxx

@@ -9,6 +9,7 @@
 #include "cmAlgorithms.h"
 #include "cmAlgorithms.h"
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorExpression.h"
 #include "cmMakefile.h"
 #include "cmMakefile.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 class cmExecutionStatus;
 class cmExecutionStatus;
@@ -116,7 +117,7 @@ void cmIncludeDirectoryCommand::NormalizeInclude(std::string& inc)
     return;
     return;
   }
   }
 
 
-  if (!cmSystemTools::IsOff(inc)) {
+  if (!cmIsOff(inc)) {
     cmSystemTools::ConvertToUnixSlashes(inc);
     cmSystemTools::ConvertToUnixSlashes(inc);
 
 
     if (!cmSystemTools::FileIsFullPath(inc)) {
     if (!cmSystemTools::FileIsFullPath(inc)) {

+ 1 - 2
Source/cmInstalledFile.cxx

@@ -6,7 +6,6 @@
 #include "cmListFileCache.h"
 #include "cmListFileCache.h"
 #include "cmMakefile.h"
 #include "cmMakefile.h"
 #include "cmStringAlgorithms.h"
 #include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
 
 
 #include <utility>
 #include <utility>
 
 
@@ -98,7 +97,7 @@ bool cmInstalledFile::GetPropertyAsBool(const std::string& prop) const
 {
 {
   std::string value;
   std::string value;
   bool isSet = this->GetProperty(prop, value);
   bool isSet = this->GetProperty(prop, value);
-  return isSet && cmSystemTools::IsOn(value);
+  return isSet && cmIsOn(value);
 }
 }
 
 
 void cmInstalledFile::GetPropertyAsList(const std::string& prop,
 void cmInstalledFile::GetPropertyAsList(const std::string& prop,

+ 2 - 3
Source/cmLinkLineDeviceComputer.cxx

@@ -18,7 +18,6 @@
 #include "cmStateSnapshot.h"
 #include "cmStateSnapshot.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
 #include "cmStringAlgorithms.h"
 #include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
 
 
 class cmOutputConverter;
 class cmOutputConverter;
 
 
@@ -165,12 +164,12 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
         target.GetProperty("CUDA_RESOLVE_DEVICE_SYMBOLS")) {
         target.GetProperty("CUDA_RESOLVE_DEVICE_SYMBOLS")) {
     // If CUDA_RESOLVE_DEVICE_SYMBOLS has been explicitly set we need
     // If CUDA_RESOLVE_DEVICE_SYMBOLS has been explicitly set we need
     // to honor the value no matter what it is.
     // to honor the value no matter what it is.
-    return cmSystemTools::IsOn(resolveDeviceSymbols);
+    return cmIsOn(resolveDeviceSymbols);
   }
   }
 
 
   if (const char* separableCompilation =
   if (const char* separableCompilation =
         target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
         target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
-    if (cmSystemTools::IsOn(separableCompilation)) {
+    if (cmIsOn(separableCompilation)) {
       bool doDeviceLinking = false;
       bool doDeviceLinking = false;
       switch (target.GetType()) {
       switch (target.GetType()) {
         case cmStateEnums::SHARED_LIBRARY:
         case cmStateEnums::SHARED_LIBRARY:

+ 6 - 7
Source/cmLocalGenerator.cxx

@@ -900,7 +900,7 @@ void cmLocalGenerator::AddCompileOptions(std::string& flags,
         std::unique_ptr<cmCompiledGeneratorExpression> cge =
         std::unique_ptr<cmCompiledGeneratorExpression> cge =
           ge.Parse(jmcExprGen);
           ge.Parse(jmcExprGen);
         std::string isJMCEnabled = cge->Evaluate(this, config);
         std::string isJMCEnabled = cge->Evaluate(this, config);
-        if (cmSystemTools::IsOn(isJMCEnabled)) {
+        if (cmIsOn(isJMCEnabled)) {
           std::vector<std::string> optVec;
           std::vector<std::string> optVec;
           cmExpandList(jmc, optVec);
           cmExpandList(jmc, optVec);
           this->AppendCompileOptions(flags, optVec);
           this->AppendCompileOptions(flags, optVec);
@@ -1254,8 +1254,7 @@ void cmLocalGenerator::GetTargetFlags(
                                   frameworkPath, linkPath);
                                   frameworkPath, linkPath);
       }
       }
 
 
-      if (cmSystemTools::IsOn(
-            this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) {
+      if (cmIsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) {
         std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") +
         std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") +
           linkLanguage + std::string("_FLAGS");
           linkLanguage + std::string("_FLAGS");
         linkFlags += this->Makefile->GetSafeDefinition(sFlagVar);
         linkFlags += this->Makefile->GetSafeDefinition(sFlagVar);
@@ -1763,7 +1762,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
   std::string extProp = lang + "_EXTENSIONS";
   std::string extProp = lang + "_EXTENSIONS";
   bool ext = true;
   bool ext = true;
   if (const char* extPropValue = target->GetProperty(extProp)) {
   if (const char* extPropValue = target->GetProperty(extProp)) {
-    if (cmSystemTools::IsOff(extPropValue)) {
+    if (cmIsOff(extPropValue)) {
       ext = false;
       ext = false;
     }
     }
   }
   }
@@ -2174,10 +2173,10 @@ void cmLocalGenerator::AppendPositionIndependentLinkerFlags(
     return;
     return;
   }
   }
 
 
-  const std::string mode = cmSystemTools::IsOn(PICValue) ? "PIE" : "NO_PIE";
+  const std::string mode = cmIsOn(PICValue) ? "PIE" : "NO_PIE";
 
 
   std::string supported = "CMAKE_" + lang + "_LINK_" + mode + "_SUPPORTED";
   std::string supported = "CMAKE_" + lang + "_LINK_" + mode + "_SUPPORTED";
-  if (cmSystemTools::IsOff(this->Makefile->GetDefinition(supported))) {
+  if (cmIsOff(this->Makefile->GetDefinition(supported))) {
     return;
     return;
   }
   }
 
 
@@ -2266,7 +2265,7 @@ void cmLocalGenerator::AppendIncludeDirectories(
 
 
     std::string inc = include;
     std::string inc = include;
 
 
-    if (!cmSystemTools::IsOff(inc)) {
+    if (!cmIsOff(inc)) {
       cmSystemTools::ConvertToUnixSlashes(inc);
       cmSystemTools::ConvertToUnixSlashes(inc);
     }
     }
 
 

+ 3 - 3
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -853,7 +853,7 @@ void cmLocalUnixMakefileGenerator3::AppendRuleDepend(
   // it is specifically enabled by the user or project.
   // it is specifically enabled by the user or project.
   const char* nodep =
   const char* nodep =
     this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
     this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
-  if (!nodep || cmSystemTools::IsOff(nodep)) {
+  if (!nodep || cmIsOff(nodep)) {
     depends.emplace_back(ruleFileName);
     depends.emplace_back(ruleFileName);
   }
   }
 }
 }
@@ -1423,7 +1423,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
   if (haveDirectoryInfo) {
   if (haveDirectoryInfo) {
     // Test whether we need to force Unix paths.
     // Test whether we need to force Unix paths.
     if (const char* force = mf->GetDefinition("CMAKE_FORCE_UNIX_PATHS")) {
     if (const char* force = mf->GetDefinition("CMAKE_FORCE_UNIX_PATHS")) {
-      if (!cmSystemTools::IsOff(force)) {
+      if (!cmIsOff(force)) {
         cmSystemTools::SetForceUnixPaths(true);
         cmSystemTools::SetForceUnixPaths(true);
       }
       }
     }
     }
@@ -1689,7 +1689,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
   depends.clear();
   depends.clear();
   const char* noall =
   const char* noall =
     this->Makefile->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
     this->Makefile->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
-  if (!noall || cmSystemTools::IsOff(noall)) {
+  if (!noall || cmIsOff(noall)) {
     // Drive the build before installing.
     // Drive the build before installing.
     depends.emplace_back("all");
     depends.emplace_back("all");
   } else if (regenerate) {
   } else if (regenerate) {

+ 7 - 7
Source/cmMakefile.cxx

@@ -1840,7 +1840,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
       cmExpandList(nvalue, files);
       cmExpandList(nvalue, files);
       nvalue.clear();
       nvalue.clear();
       for (cc = 0; cc < files.size(); cc++) {
       for (cc = 0; cc < files.size(); cc++) {
-        if (!cmSystemTools::IsOff(files[cc])) {
+        if (!cmIsOff(files[cc])) {
           files[cc] = cmSystemTools::CollapseFullPath(files[cc]);
           files[cc] = cmSystemTools::CollapseFullPath(files[cc]);
         }
         }
         if (cc > 0) {
         if (cc > 0) {
@@ -2324,7 +2324,7 @@ void cmMakefile::ExpandVariablesCMP0019()
 bool cmMakefile::IsOn(const std::string& name) const
 bool cmMakefile::IsOn(const std::string& name) const
 {
 {
   const char* value = this->GetDefinition(name);
   const char* value = this->GetDefinition(name);
-  return cmSystemTools::IsOn(value);
+  return cmIsOn(value);
 }
 }
 
 
 bool cmMakefile::IsSet(const std::string& name) const
 bool cmMakefile::IsSet(const std::string& name) const
@@ -2338,7 +2338,7 @@ bool cmMakefile::IsSet(const std::string& name) const
     return false;
     return false;
   }
   }
 
 
-  if (cmSystemTools::IsNOTFOUND(value)) {
+  if (cmIsNOTFOUND(value)) {
     return false;
     return false;
   }
   }
 
 
@@ -3650,7 +3650,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
     // Replace #cmakedefine instances.
     // Replace #cmakedefine instances.
     if (this->cmDefineRegex.find(line)) {
     if (this->cmDefineRegex.find(line)) {
       const char* def = this->GetDefinition(this->cmDefineRegex.match(2));
       const char* def = this->GetDefinition(this->cmDefineRegex.match(2));
-      if (!cmSystemTools::IsOff(def)) {
+      if (!cmIsOff(def)) {
         const std::string indentation = this->cmDefineRegex.match(1);
         const std::string indentation = this->cmDefineRegex.match(1);
         cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine",
         cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine",
                                      "#" + indentation + "define");
                                      "#" + indentation + "define");
@@ -3666,7 +3666,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
       cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine01",
       cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine01",
                                    "#" + indentation + "define");
                                    "#" + indentation + "define");
       output += line;
       output += line;
-      if (!cmSystemTools::IsOff(def)) {
+      if (!cmIsOff(def)) {
         output += " 1";
         output += " 1";
       } else {
       } else {
         output += " 0";
         output += " 0";
@@ -3830,7 +3830,7 @@ const char* cmMakefile::GetProperty(const std::string& prop, bool chain) const
 
 
 bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
 bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
 {
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return cmIsOn(this->GetProperty(prop));
 }
 }
 
 
 std::vector<std::string> cmMakefile::GetPropertyKeys() const
 std::vector<std::string> cmMakefile::GetPropertyKeys() const
@@ -4220,7 +4220,7 @@ bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var)
 {
 {
   // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
   // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
   if (const char* val = this->GetDefinition(var)) {
   if (const char* val = this->GetDefinition(var)) {
-    return cmSystemTools::IsOn(val);
+    return cmIsOn(val);
   }
   }
   // Enable optional policy warnings with --debug-output, --trace,
   // Enable optional policy warnings with --debug-output, --trace,
   // or --trace-expand.
   // or --trace-expand.

+ 4 - 4
Source/cmMakefileTargetGenerator.cxx

@@ -49,7 +49,7 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
   this->NoRuleMessages = false;
   this->NoRuleMessages = false;
   if (const char* ruleStatus =
   if (const char* ruleStatus =
         cm->GetState()->GetGlobalProperty("RULE_MESSAGES")) {
         cm->GetState()->GetGlobalProperty("RULE_MESSAGES")) {
-    this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
+    this->NoRuleMessages = cmIsOff(ruleStatus);
   }
   }
   MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
   MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
 }
 }
@@ -186,7 +186,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
 
 
   // add custom commands to the clean rules?
   // add custom commands to the clean rules?
   const char* clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
   const char* clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
-  bool clean = cmSystemTools::IsOff(clean_no_custom);
+  bool clean = cmIsOff(clean_no_custom);
 
 
   // First generate the object rule files.  Save a list of all object
   // First generate the object rule files.  Save a list of all object
   // files for this target.
   // files for this target.
@@ -1528,7 +1528,7 @@ bool cmMakefileTargetGenerator::CheckUseResponseFileForObjects(
     "CMAKE_" + l + "_USE_RESPONSE_FILE_FOR_OBJECTS";
     "CMAKE_" + l + "_USE_RESPONSE_FILE_FOR_OBJECTS";
   if (const char* val = this->Makefile->GetDefinition(responseVar)) {
   if (const char* val = this->Makefile->GetDefinition(responseVar)) {
     if (*val) {
     if (*val) {
-      return cmSystemTools::IsOn(val);
+      return cmIsOn(val);
     }
     }
   }
   }
 
 
@@ -1567,7 +1567,7 @@ bool cmMakefileTargetGenerator::CheckUseResponseFileForLibraries(
     "CMAKE_" + l + "_USE_RESPONSE_FILE_FOR_LIBRARIES";
     "CMAKE_" + l + "_USE_RESPONSE_FILE_FOR_LIBRARIES";
   if (const char* val = this->Makefile->GetDefinition(responseVar)) {
   if (const char* val = this->Makefile->GetDefinition(responseVar)) {
     if (*val) {
     if (*val) {
-      return cmSystemTools::IsOn(val);
+      return cmIsOn(val);
     }
     }
   }
   }
 
 

+ 1 - 2
Source/cmOptionCommand.cxx

@@ -11,7 +11,6 @@
 #include "cmStateSnapshot.h"
 #include "cmStateSnapshot.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
 #include "cmStringAlgorithms.h"
 #include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
 
 
 class cmExecutionStatus;
 class cmExecutionStatus;
 
 
@@ -67,7 +66,7 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
   if (args.size() == 3) {
   if (args.size() == 3) {
     initialValue = args[2];
     initialValue = args[2];
   }
   }
-  bool init = cmSystemTools::IsOn(initialValue);
+  bool init = cmIsOn(initialValue);
   this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF",
   this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF",
                                      args[1].c_str(), cmStateEnums::BOOL);
                                      args[1].c_str(), cmStateEnums::BOOL);
 
 

+ 2 - 4
Source/cmQtAutoGenGlobalInitializer.cxx

@@ -49,8 +49,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
     {
     {
       cmMakefile* makefile = localGen->GetMakefile();
       cmMakefile* makefile = localGen->GetMakefile();
       // Detect global autogen target name
       // Detect global autogen target name
-      if (cmSystemTools::IsOn(
-            makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET"))) {
+      if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET"))) {
         std::string targetName =
         std::string targetName =
           makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET_NAME");
           makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET_NAME");
         if (targetName.empty()) {
         if (targetName.empty()) {
@@ -61,8 +60,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
       }
       }
 
 
       // Detect global autorcc target name
       // Detect global autorcc target name
-      if (cmSystemTools::IsOn(
-            makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET"))) {
+      if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET"))) {
         std::string targetName =
         std::string targetName =
           makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET_NAME");
           makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET_NAME");
         if (targetName.empty()) {
         if (targetName.empty()) {

+ 2 - 3
Source/cmQtAutoGenInitializer.cxx

@@ -245,7 +245,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
     unsigned long iVerb = 0;
     unsigned long iVerb = 0;
     if (!cmStrToULong(this->Verbosity, &iVerb)) {
     if (!cmStrToULong(this->Verbosity, &iVerb)) {
       // Non numeric verbosity
       // Non numeric verbosity
-      this->Verbosity = cmSystemTools::IsOn(this->Verbosity) ? "1" : "0";
+      this->Verbosity = cmIsOn(this->Verbosity) ? "1" : "0";
     }
     }
   }
   }
 
 
@@ -407,8 +407,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
 
 
     // CMAKE_AUTOMOC_RELAXED_MODE deprecation warning
     // CMAKE_AUTOMOC_RELAXED_MODE deprecation warning
     if (this->Moc.Enabled) {
     if (this->Moc.Enabled) {
-      if (cmSystemTools::IsOn(
-            makefile->GetDefinition("CMAKE_AUTOMOC_RELAXED_MODE"))) {
+      if (cmIsOn(makefile->GetDefinition("CMAKE_AUTOMOC_RELAXED_MODE"))) {
         std::string msg = "AUTOMOC: CMAKE_AUTOMOC_RELAXED_MODE is "
         std::string msg = "AUTOMOC: CMAKE_AUTOMOC_RELAXED_MODE is "
                           "deprecated an will be removed in the future.  ";
                           "deprecated an will be removed in the future.  ";
         msg += "Consider disabling it and converting the target ";
         msg += "Consider disabling it and converting the target ";

+ 2 - 2
Source/cmQtAutoGenerator.cxx

@@ -26,7 +26,7 @@ cmQtAutoGenerator::Logger::Logger()
         SetVerbosity(static_cast<unsigned int>(iVerbose));
         SetVerbosity(static_cast<unsigned int>(iVerbose));
       } else {
       } else {
         // Non numeric verbosity
         // Non numeric verbosity
-        SetVerbose(cmSystemTools::IsOn(verbose));
+        SetVerbose(cmIsOn(verbose));
       }
       }
     }
     }
   }
   }
@@ -34,7 +34,7 @@ cmQtAutoGenerator::Logger::Logger()
     std::string colorEnv;
     std::string colorEnv;
     cmSystemTools::GetEnv("COLOR", colorEnv);
     cmSystemTools::GetEnv("COLOR", colorEnv);
     if (!colorEnv.empty()) {
     if (!colorEnv.empty()) {
-      SetColorOutput(cmSystemTools::IsOn(colorEnv));
+      SetColorOutput(cmIsOn(colorEnv));
     } else {
     } else {
       SetColorOutput(true);
       SetColorOutput(true);
     }
     }

+ 3 - 2
Source/cmSetPropertyCommand.cxx

@@ -11,6 +11,7 @@
 #include "cmRange.h"
 #include "cmRange.h"
 #include "cmSourceFile.h"
 #include "cmSourceFile.h"
 #include "cmState.h"
 #include "cmState.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 #include "cmTarget.h"
 #include "cmTarget.h"
 #include "cmTest.h"
 #include "cmTest.h"
@@ -331,8 +332,8 @@ bool cmSetPropertyCommand::HandleTest(cmTest* test)
 bool cmSetPropertyCommand::HandleCacheMode()
 bool cmSetPropertyCommand::HandleCacheMode()
 {
 {
   if (this->PropertyName == "ADVANCED") {
   if (this->PropertyName == "ADVANCED") {
-    if (!this->Remove && !cmSystemTools::IsOn(this->PropertyValue) &&
-        !cmSystemTools::IsOff(this->PropertyValue)) {
+    if (!this->Remove && !cmIsOn(this->PropertyValue) &&
+        !cmIsOff(this->PropertyValue)) {
       std::ostringstream e;
       std::ostringstream e;
       e << "given non-boolean value \"" << this->PropertyValue
       e << "given non-boolean value \"" << this->PropertyValue
         << R"(" for CACHE property "ADVANCED".  )";
         << R"(" for CACHE property "ADVANCED".  )";

+ 2 - 2
Source/cmSetSourceFilesPropertiesCommand.cxx

@@ -4,7 +4,7 @@
 
 
 #include "cmMakefile.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
 #include "cmSourceFile.h"
-#include "cmSystemTools.h"
+#include "cmStringAlgorithms.h"
 
 
 class cmExecutionStatus;
 class cmExecutionStatus;
 
 
@@ -87,7 +87,7 @@ bool cmSetSourceFilesPropertiesCommand::RunCommand(
         propertyPairs.push_back(*j);
         propertyPairs.push_back(*j);
         if (*j == "GENERATED") {
         if (*j == "GENERATED") {
           ++j;
           ++j;
-          if (j != propend && cmSystemTools::IsOn(*j)) {
+          if (j != propend && cmIsOn(*j)) {
             generated = true;
             generated = true;
           }
           }
         } else {
         } else {

+ 2 - 1
Source/cmSiteNameCommand.cxx

@@ -6,6 +6,7 @@
 
 
 #include "cmMakefile.h"
 #include "cmMakefile.h"
 #include "cmStateTypes.h"
 #include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 
 
 class cmExecutionStatus;
 class cmExecutionStatus;
@@ -50,7 +51,7 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args,
   }
   }
 #else
 #else
   // try to find the hostname for this computer
   // try to find the hostname for this computer
-  if (!cmSystemTools::IsOff(hostname_cmd)) {
+  if (!cmIsOff(hostname_cmd)) {
     std::string host;
     std::string host;
     cmSystemTools::RunSingleCommand(hostname_cmd, &host, nullptr, nullptr,
     cmSystemTools::RunSingleCommand(hostname_cmd, &host, nullptr, nullptr,
                                     nullptr, cmSystemTools::OUTPUT_NONE);
                                     nullptr, cmSystemTools::OUTPUT_NONE);

+ 3 - 2
Source/cmSourceFile.cxx

@@ -11,6 +11,7 @@
 #include "cmMessageType.h"
 #include "cmMessageType.h"
 #include "cmProperty.h"
 #include "cmProperty.h"
 #include "cmState.h"
 #include "cmState.h"
+#include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmSystemTools.h"
 #include "cmake.h"
 #include "cmake.h"
 
 
@@ -242,7 +243,7 @@ void cmSourceFile::SetProperty(const std::string& prop, const char* value)
 
 
   // Update IsGenerated flag
   // Update IsGenerated flag
   if (prop == propGENERATED) {
   if (prop == propGENERATED) {
-    this->IsGenerated = cmSystemTools::IsOn(value);
+    this->IsGenerated = cmIsOn(value);
   }
   }
 }
 }
 
 
@@ -316,7 +317,7 @@ const char* cmSourceFile::GetSafeProperty(const std::string& prop) const
 
 
 bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const
 bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const
 {
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return cmIsOn(this->GetProperty(prop));
 }
 }
 
 
 cmCustomCommand* cmSourceFile::GetCustomCommand()
 cmCustomCommand* cmSourceFile::GetCustomCommand()

+ 1 - 1
Source/cmState.cxx

@@ -598,7 +598,7 @@ const char* cmState::GetGlobalProperty(const std::string& prop)
 
 
 bool cmState::GetGlobalPropertyAsBool(const std::string& prop)
 bool cmState::GetGlobalPropertyAsBool(const std::string& prop)
 {
 {
-  return cmSystemTools::IsOn(this->GetGlobalProperty(prop));
+  return cmIsOn(this->GetGlobalProperty(prop));
 }
 }
 
 
 void cmState::SetSourceDirectory(std::string const& sourceDirectory)
 void cmState::SetSourceDirectory(std::string const& sourceDirectory)

+ 1 - 1
Source/cmStateDirectory.cxx

@@ -662,7 +662,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop,
 
 
 bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const
 bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const
 {
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return cmIsOn(this->GetProperty(prop));
 }
 }
 
 
 std::vector<std::string> cmStateDirectory::GetPropertyKeys() const
 std::vector<std::string> cmStateDirectory::GetPropertyKeys() const

+ 1 - 1
Source/cmStateSnapshot.cxx

@@ -328,7 +328,7 @@ void cmStateSnapshot::SetDefaultDefinitions()
 #if defined(__CYGWIN__)
 #if defined(__CYGWIN__)
   std::string legacy;
   std::string legacy;
   if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
   if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
-      cmSystemTools::IsOn(legacy.c_str())) {
+      cmIsOn(legacy.c_str())) {
     this->SetDefinition("WIN32", "1");
     this->SetDefinition("WIN32", "1");
     this->SetDefinition("CMAKE_HOST_WIN32", "1");
     this->SetDefinition("CMAKE_HOST_WIN32", "1");
   }
   }

+ 2 - 2
Source/cmTarget.cxx

@@ -1191,7 +1191,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
       impl->SourceBacktraces.push_back(lfbt);
       impl->SourceBacktraces.push_back(lfbt);
     }
     }
   } else if (prop == propIMPORTED_GLOBAL) {
   } else if (prop == propIMPORTED_GLOBAL) {
-    if (!cmSystemTools::IsOn(value)) {
+    if (!cmIsOn(value)) {
       std::ostringstream e;
       std::ostringstream e;
       e << "IMPORTED_GLOBAL property can't be set to FALSE on targets (\""
       e << "IMPORTED_GLOBAL property can't be set to FALSE on targets (\""
         << impl->Name << "\")\n";
         << impl->Name << "\")\n";
@@ -1671,7 +1671,7 @@ const char* cmTarget::GetSafeProperty(const std::string& prop) const
 
 
 bool cmTarget::GetPropertyAsBool(const std::string& prop) const
 bool cmTarget::GetPropertyAsBool(const std::string& prop) const
 {
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return cmIsOn(this->GetProperty(prop));
 }
 }
 
 
 cmPropertyMap const& cmTarget::GetProperties() const
 cmPropertyMap const& cmTarget::GetProperties() const

+ 2 - 2
Source/cmTest.cxx

@@ -5,7 +5,7 @@
 #include "cmMakefile.h"
 #include "cmMakefile.h"
 #include "cmProperty.h"
 #include "cmProperty.h"
 #include "cmState.h"
 #include "cmState.h"
-#include "cmSystemTools.h"
+#include "cmStringAlgorithms.h"
 
 
 cmTest::cmTest(cmMakefile* mf)
 cmTest::cmTest(cmMakefile* mf)
   : CommandExpandLists(false)
   : CommandExpandLists(false)
@@ -47,7 +47,7 @@ const char* cmTest::GetProperty(const std::string& prop) const
 
 
 bool cmTest::GetPropertyAsBool(const std::string& prop) const
 bool cmTest::GetPropertyAsBool(const std::string& prop) const
 {
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return cmIsOn(this->GetProperty(prop));
 }
 }
 
 
 void cmTest::SetProperty(const std::string& prop, const char* value)
 void cmTest::SetProperty(const std::string& prop, const char* value)

+ 10 - 10
Source/cmVisualStudio10TargetGenerator.cxx

@@ -838,7 +838,7 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReference(
     const char* privateReference = "True";
     const char* privateReference = "True";
     if (const char* value = this->GeneratorTarget->GetProperty(
     if (const char* value = this->GeneratorTarget->GetProperty(
           "VS_DOTNET_REFERENCES_COPY_LOCAL")) {
           "VS_DOTNET_REFERENCES_COPY_LOCAL")) {
-      if (cmSystemTools::IsOff(value)) {
+      if (cmIsOff(value)) {
         privateReference = "False";
         privateReference = "False";
       }
       }
     }
     }
@@ -1948,11 +1948,11 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
         const std::string& enableDebug =
         const std::string& enableDebug =
           cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
           cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
         if (!enableDebug.empty()) {
         if (!enableDebug.empty()) {
-          e2.WritePlatformConfigTag(
-            "EnableDebuggingInformation",
-            "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
-              "|" + this->Platform + "'",
-            cmSystemTools::IsOn(enableDebug) ? "true" : "false");
+          e2.WritePlatformConfigTag("EnableDebuggingInformation",
+                                    "'$(Configuration)|$(Platform)'=='" +
+                                      this->Configurations[i] + "|" +
+                                      this->Platform + "'",
+                                    cmIsOn(enableDebug) ? "true" : "false");
         }
         }
       }
       }
     }
     }
@@ -1969,7 +1969,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
             "DisableOptimizations",
             "DisableOptimizations",
             "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
             "'$(Configuration)|$(Platform)'=='" + this->Configurations[i] +
               "|" + this->Platform + "'",
               "|" + this->Platform + "'",
-            (cmSystemTools::IsOn(disableOptimizations) ? "true" : "false"));
+            (cmIsOn(disableOptimizations) ? "true" : "false"));
         }
         }
       }
       }
     }
     }
@@ -2743,7 +2743,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
       }
       }
     }
     }
     if (const char* winRT = clOptions.GetFlag("CompileAsWinRT")) {
     if (const char* winRT = clOptions.GetFlag("CompileAsWinRT")) {
-      if (cmSystemTools::IsOn(winRT)) {
+      if (cmIsOn(winRT)) {
         this->TargetCompileAsWinRT = true;
         this->TargetCompileAsWinRT = true;
       }
       }
     }
     }
@@ -3273,9 +3273,9 @@ void cmVisualStudio10TargetGenerator::WriteManifestOptions(
     if (dpiAware) {
     if (dpiAware) {
       if (!strcmp(dpiAware, "PerMonitor")) {
       if (!strcmp(dpiAware, "PerMonitor")) {
         e2.Element("EnableDpiAwareness", "PerMonitorHighDPIAware");
         e2.Element("EnableDpiAwareness", "PerMonitorHighDPIAware");
-      } else if (cmSystemTools::IsOn(dpiAware)) {
+      } else if (cmIsOn(dpiAware)) {
         e2.Element("EnableDpiAwareness", "true");
         e2.Element("EnableDpiAwareness", "true");
-      } else if (cmSystemTools::IsOff(dpiAware)) {
+      } else if (cmIsOff(dpiAware)) {
         e2.Element("EnableDpiAwareness", "false");
         e2.Element("EnableDpiAwareness", "false");
       } else {
       } else {
         cmSystemTools::Error("Bad parameter for VS_DPI_AWARE: " +
         cmSystemTools::Error("Bad parameter for VS_DPI_AWARE: " +

+ 9 - 13
Source/cmake.cxx

@@ -1365,18 +1365,16 @@ int cmake::Configure()
   // so we cannot rely on command line options alone. Always ensure our
   // so we cannot rely on command line options alone. Always ensure our
   // messenger is in sync with the cache.
   // messenger is in sync with the cache.
   const char* value = this->State->GetCacheEntryValue("CMAKE_WARN_DEPRECATED");
   const char* value = this->State->GetCacheEntryValue("CMAKE_WARN_DEPRECATED");
-  this->Messenger->SetSuppressDeprecatedWarnings(value &&
-                                                 cmSystemTools::IsOff(value));
+  this->Messenger->SetSuppressDeprecatedWarnings(value && cmIsOff(value));
 
 
   value = this->State->GetCacheEntryValue("CMAKE_ERROR_DEPRECATED");
   value = this->State->GetCacheEntryValue("CMAKE_ERROR_DEPRECATED");
-  this->Messenger->SetDeprecatedWarningsAsErrors(cmSystemTools::IsOn(value));
+  this->Messenger->SetDeprecatedWarningsAsErrors(cmIsOn(value));
 
 
   value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
   value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
-  this->Messenger->SetSuppressDevWarnings(cmSystemTools::IsOn(value));
+  this->Messenger->SetSuppressDevWarnings(cmIsOn(value));
 
 
   value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_ERRORS");
   value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_ERRORS");
-  this->Messenger->SetDevWarningsAsErrors(value &&
-                                          cmSystemTools::IsOff(value));
+  this->Messenger->SetDevWarningsAsErrors(value && cmIsOff(value));
 
 
   int ret = this->ActualConfigure();
   int ret = this->ActualConfigure();
   const char* delCacheVars =
   const char* delCacheVars =
@@ -1804,15 +1802,13 @@ void cmake::AddCacheEntry(const std::string& key, const char* value,
   this->UnwatchUnusedCli(key);
   this->UnwatchUnusedCli(key);
 
 
   if (key == "CMAKE_WARN_DEPRECATED") {
   if (key == "CMAKE_WARN_DEPRECATED") {
-    this->Messenger->SetSuppressDeprecatedWarnings(
-      value && cmSystemTools::IsOff(value));
+    this->Messenger->SetSuppressDeprecatedWarnings(value && cmIsOff(value));
   } else if (key == "CMAKE_ERROR_DEPRECATED") {
   } else if (key == "CMAKE_ERROR_DEPRECATED") {
-    this->Messenger->SetDeprecatedWarningsAsErrors(cmSystemTools::IsOn(value));
+    this->Messenger->SetDeprecatedWarningsAsErrors(cmIsOn(value));
   } else if (key == "CMAKE_SUPPRESS_DEVELOPER_WARNINGS") {
   } else if (key == "CMAKE_SUPPRESS_DEVELOPER_WARNINGS") {
-    this->Messenger->SetSuppressDevWarnings(cmSystemTools::IsOn(value));
+    this->Messenger->SetSuppressDevWarnings(cmIsOn(value));
   } else if (key == "CMAKE_SUPPRESS_DEVELOPER_ERRORS") {
   } else if (key == "CMAKE_SUPPRESS_DEVELOPER_ERRORS") {
-    this->Messenger->SetDevWarningsAsErrors(value &&
-                                            cmSystemTools::IsOff(value));
+    this->Messenger->SetDevWarningsAsErrors(value && cmIsOff(value));
   }
   }
 }
 }
 
 
@@ -2626,7 +2622,7 @@ int cmake::Build(int jobs, const std::string& dir,
 
 
   const char* cachedVerbose =
   const char* cachedVerbose =
     this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE");
     this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE");
-  if (cmSystemTools::IsOn(cachedVerbose)) {
+  if (cmIsOn(cachedVerbose)) {
     verbose = true;
     verbose = true;
   }
   }
 
 

+ 3 - 4
Source/cmcmd.cxx

@@ -945,8 +945,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
         if (args.size() >= 9 && args[8].length() >= 8 &&
         if (args.size() >= 9 && args[8].length() >= 8 &&
             args[8].substr(0, 8) == "--color=") {
             args[8].substr(0, 8) == "--color=") {
           // Enable or disable color based on the switch value.
           // Enable or disable color based on the switch value.
-          color =
-            (args[8].size() == 8 || cmSystemTools::IsOn(args[8].substr(8)));
+          color = (args[8].size() == 8 || cmIsOn(args[8].substr(8)));
         }
         }
       } else {
       } else {
         // Support older signature for existing makefiles:
         // Support older signature for existing makefiles:
@@ -1411,7 +1410,7 @@ int cmcmd::ExecuteEchoColor(std::vector<std::string> const& args)
       // Enable or disable color based on the switch value.
       // Enable or disable color based on the switch value.
       std::string value = arg.substr(9);
       std::string value = arg.substr(9);
       if (!value.empty()) {
       if (!value.empty()) {
-        enabled = cmSystemTools::IsOn(value);
+        enabled = cmIsOn(value);
       }
       }
     } else if (cmHasLiteralPrefix(arg, "--progress-dir=")) {
     } else if (cmHasLiteralPrefix(arg, "--progress-dir=")) {
       progressDir = arg.substr(15);
       progressDir = arg.substr(15);
@@ -1463,7 +1462,7 @@ int cmcmd::ExecuteLinkScript(std::vector<std::string> const& args)
   bool verbose = false;
   bool verbose = false;
   if (args.size() >= 4) {
   if (args.size() >= 4) {
     if (args[3].find("--verbose=") == 0) {
     if (args[3].find("--verbose=") == 0) {
-      if (!cmSystemTools::IsOff(args[3].substr(10))) {
+      if (!cmIsOff(args[3].substr(10))) {
         verbose = true;
         verbose = true;
       }
       }
     }
     }