1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER

We use the `CMake_` prefix for options affecting CMake itself.
This commit is contained in:
Brad King
2021-02-01 13:29:51 -05:00
parent c28dbd7e30
commit b6071c93f5
6 changed files with 18 additions and 18 deletions

View File

@@ -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()

View File

@@ -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@"

View File

@@ -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;

View File

@@ -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()) {

View File

@@ -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);

View File

@@ -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());