mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
cmELF: Include the ELF parsing code unconditionally
Now that the ELF definitions are provided on all platforms there is no need to keep the CMake_USE_ELF_PARSER option.
This commit is contained in:
committed by
Brad King
parent
5dfa3ddbe5
commit
115ff6a347
@@ -31,6 +31,7 @@
|
||||
#include "cmArgumentParser.h"
|
||||
#include "cmCMakePath.h"
|
||||
#include "cmCryptoHash.h"
|
||||
#include "cmELF.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmFSPermissions.h"
|
||||
#include "cmFileCopier.h"
|
||||
@@ -64,10 +65,6 @@
|
||||
# include "cmFileLockResult.h"
|
||||
#endif
|
||||
|
||||
#if defined(CMake_USE_ELF_PARSER)
|
||||
# include "cmELF.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
@@ -1242,8 +1239,12 @@ bool HandleReadElfCommand(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(CMake_USE_ELF_PARSER)
|
||||
cmELF elf(fileNameArg.c_str());
|
||||
if (!elf) {
|
||||
status.SetError(cmStrCat("READ_ELF given FILE \"", fileNameArg,
|
||||
"\" that is not a valid ELF file."));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!arguments.RPath.empty()) {
|
||||
if (cmELF::StringEntry const* se_rpath = elf.GetRPath()) {
|
||||
@@ -1261,15 +1262,6 @@ bool HandleReadElfCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
std::string error = "ELF parser not available on this platform.";
|
||||
if (arguments.Error.empty()) {
|
||||
status.SetError(error);
|
||||
return false;
|
||||
}
|
||||
status.GetMakefile().AddDefinition(arguments.Error, error);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool HandleInstallCommand(std::vector<std::string> const& args,
|
||||
|
||||
Reference in New Issue
Block a user