Browse Source

KWSys: Disable the path translation map for build within CMake

It is about to be removed from KWSys.
Brad King 1 year ago
parent
commit
73dddffe32
5 changed files with 4 additions and 32 deletions
  1. 3 0
      CMakeLists.txt
  2. 0 3
      Source/CTest/cmCTestStartCommand.cxx
  3. 0 26
      Source/cmake.cxx
  4. 0 2
      Source/cmake.h
  5. 1 1
      bootstrap

+ 3 - 0
CMakeLists.txt

@@ -100,6 +100,9 @@ configure_file(Utilities/std/cmSTL.hxx.in Utilities/cmSTL.hxx @ONLY)
 # set the internal encoding of CMake to UTF-8
 set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8)
 
+# disable translation map
+set(KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP 0)
+
 # option to use COMPONENT with install command
 option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF)
 mark_as_advanced(CMake_INSTALL_COMPONENTS)

+ 0 - 3
Source/CTest/cmCTestStartCommand.cxx

@@ -85,9 +85,6 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
     return false;
   }
 
-  cmSystemTools::AddKeepPath(*src_dir);
-  cmSystemTools::AddKeepPath(*bld_dir);
-
   this->CTest->EmptyCTestConfiguration();
 
   std::string sourceDir = cmSystemTools::CollapseFullPath(*src_dir);

+ 0 - 26
Source/cmake.cxx

@@ -2362,7 +2362,6 @@ int cmake::Configure()
 int cmake::ActualConfigure()
 {
   // Construct right now our path conversion table before it's too late:
-  this->UpdateConversionPathTable();
   this->CleanupCommandsAndMacros();
 
   cmSystemTools::RemoveADirectory(this->GetHomeOutputDirectory() +
@@ -3203,31 +3202,6 @@ void cmake::PrintGeneratorList()
 #endif
 }
 
-void cmake::UpdateConversionPathTable()
-{
-  // Update the path conversion table with any specified file:
-  cmValue tablepath =
-    this->State->GetInitializedCacheValue("CMAKE_PATH_TRANSLATION_FILE");
-
-  if (tablepath) {
-    cmsys::ifstream table(tablepath->c_str());
-    if (!table) {
-      cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to " + *tablepath +
-                           ". CMake can not open file.");
-      cmSystemTools::ReportLastSystemError("CMake can not open file.");
-    } else {
-      std::string a;
-      std::string b;
-      while (!table.eof()) {
-        // two entries per line
-        table >> a;
-        table >> b;
-        cmSystemTools::AddTranslationPath(a, b);
-      }
-    }
-  }
-}
-
 int cmake::CheckBuildSystem()
 {
   // We do not need to rerun CMake.  Check dependency integrity.

+ 0 - 2
Source/cmake.h

@@ -805,8 +805,6 @@ private:
 
   std::unique_ptr<cmGlobalGenerator> GlobalGenerator;
 
-  void UpdateConversionPathTable();
-
   //! Print a list of valid generators to stderr.
   void PrintGeneratorList();
 

+ 1 - 1
bootstrap

@@ -1564,7 +1564,7 @@ KWSYS_CXX_HAS_UNSETENV=0
 KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
 KWSYS_CXX_HAS_UTIMENSAT=0
 KWSYS_CXX_HAS_UTIMES=0
-KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP=1
+KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP=0
 
 if cmake_try_run "${cmake_cxx_compiler}" \
   "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_SETENV" \