소스 검색

Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER

We use the `CMake_` prefix for options affecting CMake itself.
Brad King 4 년 전
부모
커밋
b6071c93f5
6개의 변경된 파일18개의 추가작업 그리고 18개의 파일을 삭제
  1. 5 5
      Source/CMakeLists.txt
  2. 1 1
      Source/cmConfigure.cmake.h.in
  3. 2 2
      Source/cmELF.h
  4. 2 2
      Source/cmFileCommand.cxx
  5. 1 1
      Source/cmGeneratorTarget.cxx
  6. 7 7
      Source/cmSystemTools.cxx

+ 5 - 5
Source/CMakeLists.txt

@@ -19,7 +19,7 @@ else()
   CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H)
 endif()
 if(HAVE_ELF_H)
-  set(CMAKE_USE_ELF_PARSER 1)
+  set(CMake_USE_ELF_PARSER 1)
 elseif(HAIKU)
   # On Haiku, we need to include elf32.h from the private headers
   set(CMake_HAIKU_INCLUDE_DIRS
@@ -32,13 +32,13 @@ elseif(HAIKU)
   unset(CMAKE_REQUIRED_INCLUDES)
 
   if(HAVE_ELF32_H)
-    set(CMAKE_USE_ELF_PARSER 1)
+    set(CMake_USE_ELF_PARSER 1)
   else()
     unset(CMake_HAIKU_INCLUDE_DIRS)
-    set(CMAKE_USE_ELF_PARSER)
+    set(CMake_USE_ELF_PARSER)
   endif()
 else()
-  set(CMAKE_USE_ELF_PARSER)
+  set(CMake_USE_ELF_PARSER)
 endif()
 
 if(NOT CMake_DEFAULT_RECURSION_LIMIT)
@@ -108,7 +108,7 @@ include_directories(
   )
 
 # Check if we can build the ELF parser.
-if(CMAKE_USE_ELF_PARSER)
+if(CMake_USE_ELF_PARSER)
   set(ELF_SRCS cmELF.h cmELF.cxx)
 endif()
 

+ 1 - 1
Source/cmConfigure.cmake.h.in

@@ -16,7 +16,7 @@
 
 #cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE
 #cmakedefine HAVE_UNSETENV
-#cmakedefine CMAKE_USE_ELF_PARSER
+#cmakedefine CMake_USE_ELF_PARSER
 #cmakedefine CMAKE_USE_MACH_PARSER
 #define CMake_DEFAULT_RECURSION_LIMIT @CMake_DEFAULT_RECURSION_LIMIT@
 #define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"

+ 2 - 2
Source/cmELF.h

@@ -10,8 +10,8 @@
 #include <utility>
 #include <vector>
 
-#if !defined(CMAKE_USE_ELF_PARSER)
-#  error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
+#if !defined(CMake_USE_ELF_PARSER)
+#  error "This file may be included only if CMake_USE_ELF_PARSER is enabled."
 #endif
 
 class cmELFInternal;

+ 2 - 2
Source/cmFileCommand.cxx

@@ -64,7 +64,7 @@
 #  include "cmFileLockResult.h"
 #endif
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 #  include "cmELF.h"
 #endif
 
@@ -1198,7 +1198,7 @@ bool HandleReadElfCommand(std::vector<std::string> const& args,
     return false;
   }
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
   cmELF elf(fileNameArg.c_str());
 
   if (!arguments.RPath.empty()) {

+ 1 - 1
Source/cmGeneratorTarget.cxx

@@ -2059,7 +2059,7 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const
     return true;
   }
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
   // Enable if the rpath flag uses a separator and the target uses ELF
   // binaries.
   std::string ll = this->GetLinkerLanguage(config);

+ 7 - 7
Source/cmSystemTools.cxx

@@ -45,7 +45,7 @@
 #  include "cmCryptoHash.h"
 #endif
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 #  include "cmELF.h"
 #endif
 
@@ -2317,7 +2317,7 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath,
 {
 // For ELF shared libraries use a real parser to get the correct
 // soname.
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
   cmELF elf(fullPath.c_str());
   if (elf) {
     return elf.GetSOName(soname);
@@ -2360,7 +2360,7 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
   return false;
 }
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 std::string::size_type cmSystemToolsFindRPath(std::string const& have,
                                               std::string const& want)
 {
@@ -2394,7 +2394,7 @@ std::string::size_type cmSystemToolsFindRPath(std::string const& have,
 }
 #endif
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 struct cmSystemToolsRPathInfo
 {
   unsigned long Position;
@@ -2404,7 +2404,7 @@ struct cmSystemToolsRPathInfo
 };
 #endif
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 bool cmSystemTools::ChangeRPath(std::string const& file,
                                 std::string const& oldRPath,
                                 std::string const& newRPath,
@@ -2720,7 +2720,7 @@ int cmSystemTools::strverscmp(std::string const& lhs, std::string const& rhs)
   return cm_strverscmp(lhs.c_str(), rhs.c_str());
 }
 
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
 bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
                                 bool* removed)
 {
@@ -2872,7 +2872,7 @@ bool cmSystemTools::RemoveRPath(std::string const& /*file*/,
 bool cmSystemTools::CheckRPath(std::string const& file,
                                std::string const& newRPath)
 {
-#if defined(CMAKE_USE_ELF_PARSER)
+#if defined(CMake_USE_ELF_PARSER)
   // Parse the ELF binary.
   cmELF elf(file.c_str());