STYLE: remove out commented code
Alex
This commit is contained in:
parent
ca3a613595
commit
b956fc2406
@ -76,8 +76,6 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||
"${CMAKE_${lang}_COMPILER_ID_EXE}\"\n\n")
|
||||
# only check if we don't have it yet
|
||||
IF(NOT CMAKE_${lang}_COMPILER_ID)
|
||||
# SET(CMAKE_${lang}_COMPILER_ID_EXE "${CMAKE_${lang}_COMPILER_ID_DIR}/ConvertedToBinary")
|
||||
# FILE(HEX_TO_BIN "${CMAKE_${lang}_COMPILER_ID_EXE_TRY}" "${CMAKE_${lang}_COMPILER_ID_EXE}")
|
||||
# Read the compiler identification string from the executable file.
|
||||
FILE(STRINGS ${CMAKE_${lang}_COMPILER_ID_EXE}
|
||||
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
|
||||
|
@ -56,8 +56,6 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin" )
|
||||
|
||||
IF(HAVE_${VARIABLE})
|
||||
# FILE(HEX_TO_BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin"
|
||||
# "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.even_more_bin")
|
||||
FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin"
|
||||
CMAKE_CHECKTYPESIZE_STRINGS LIMIT_COUNT 2 REGEX "INFO:sizeof")
|
||||
|
||||
|
@ -76,10 +76,6 @@ bool cmFileCommand::InitialPass(std::vector<std::string> const& args)
|
||||
{
|
||||
return this->HandleStringsCommand(args);
|
||||
}
|
||||
/* else if ( subCommand == "HEX_TO_BIN" )
|
||||
{
|
||||
return this->HandleHex2BinCommand(args);
|
||||
}*/
|
||||
else if ( subCommand == "GLOB" )
|
||||
{
|
||||
return this->HandleGlobCommand(args, false);
|
||||
@ -261,53 +257,6 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/*bool cmFileCommand::HandleHex2BinCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
if(args.size() != 3)
|
||||
{
|
||||
this->SetError("HEX_TO_BIN requires an input and an output file name");
|
||||
return false;
|
||||
}
|
||||
// Get the file to read.
|
||||
std::string inFileName = args[1];
|
||||
if(!cmsys::SystemTools::FileIsFullPath(inFileName.c_str()))
|
||||
{
|
||||
inFileName = this->Makefile->GetCurrentDirectory();
|
||||
inFileName += "/" + args[1];
|
||||
}
|
||||
|
||||
// Get the file to write.
|
||||
std::string outFileName = args[2];
|
||||
if(!cmsys::SystemTools::FileIsFullPath(outFileName.c_str()))
|
||||
{
|
||||
outFileName = this->Makefile->GetCurrentDirectory();
|
||||
outFileName += "/" + args[2];
|
||||
}
|
||||
|
||||
if ( !this->Makefile->CanIWriteThisFile(outFileName.c_str()) )
|
||||
{
|
||||
std::string e
|
||||
= "attempted to write a file: " + outFileName +
|
||||
" into a source directory.";
|
||||
this->SetError(e.c_str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string dir = cmSystemTools::GetFilenamePath(outFileName);
|
||||
cmSystemTools::MakeDirectory(dir.c_str());
|
||||
|
||||
bool success = cmHexFileConverter::TryConvert(inFileName.c_str(),
|
||||
outFileName.c_str());
|
||||
if (!success)
|
||||
{
|
||||
success = cmSystemTools::CopyFileAlways(inFileName.c_str(),
|
||||
outFileName.c_str());
|
||||
}
|
||||
return success;
|
||||
} */
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
|
@ -74,7 +74,6 @@ public:
|
||||
" [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]\n"
|
||||
" [NEWLINE_CONSUME] [REGEX regex]\n"
|
||||
" [NO_HEX_CONVERSION])\n"
|
||||
" FILE(HEX_TO_BIN inputfile outputfile)\n"
|
||||
" FILE(GLOB variable [RELATIVE path] [globbing expressions]...)\n"
|
||||
" FILE(GLOB_RECURSE variable [RELATIVE path] \n"
|
||||
" [globbing expressions]...)\n"
|
||||
@ -100,9 +99,6 @@ public:
|
||||
"return (CR) characters are ignored. It works also for Intel Hex and "
|
||||
"Motorola S-record files, which are automatically converted to binary "
|
||||
"format when reading them. Disable this using NO_HEX_CONVERSION.\n "
|
||||
/* "HEX_TO_BIN will convert an Intel hex file or Motorola S-record file "
|
||||
"to a binary file. If the input file is no such file it will simply "
|
||||
"be copied. \n"*/
|
||||
"LIMIT_COUNT sets the maximum number of strings to return. "
|
||||
"LIMIT_INPUT sets the maximum number of bytes to read from "
|
||||
"the input file. "
|
||||
@ -153,7 +149,6 @@ protected:
|
||||
bool HandleWriteCommand(std::vector<std::string> const& args, bool append);
|
||||
bool HandleReadCommand(std::vector<std::string> const& args);
|
||||
bool HandleStringsCommand(std::vector<std::string> const& args);
|
||||
// bool HandleHex2BinCommand(std::vector<std::string> const& args);
|
||||
bool HandleGlobCommand(std::vector<std::string> const& args, bool recurse);
|
||||
bool HandleMakeDirectoryCommand(std::vector<std::string> const& args);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user