2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2003-07-08 01:47:17 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2003-07-08 01:47:17 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2003-07-08 01:47:17 +04:00
|
|
|
#ifndef cmFileCommand_h
|
|
|
|
#define cmFileCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
ENH: merge CMake-CrossCompileBasic to HEAD
-add a RESULT_VARIABLE to INCLUDE()
-add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain
-have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system)
-use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to
run the executables if they have a different suffix because they are
probably crosscompiled, but nevertheless it should be able to find them
-make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE
-support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.)
-move ranlib on OSX from the file command to a command in executed in cmake_install.cmake
-add support for stripping during install in cmake_install.cmake
-split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools
-remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms
-create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these
-add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a
list of directories which will be prepended to all search directories, right
now as a cmake variable, turning it into a global cmake property may need
some more work
-remove cmTestTestHandler::TryExecutable(), it's unused
-split cmFileCommand::HandleInstall() into slightly smaller functions
Alex
2007-05-17 21:20:44 +04:00
|
|
|
struct cmFileInstaller;
|
|
|
|
|
2003-07-08 01:47:17 +04:00
|
|
|
/** \class cmFileCommand
|
|
|
|
* \brief Command for manipulation of files
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class cmFileCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2016-05-16 17:34:04 +03:00
|
|
|
virtual cmCommand* Clone() { return new cmFileCommand; }
|
2003-07-08 01:47:17 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2008-01-23 18:28:26 +03:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
2016-05-16 17:34:04 +03:00
|
|
|
cmExecutionStatus& status);
|
2003-07-08 01:47:17 +04:00
|
|
|
|
2004-01-27 00:05:58 +03:00
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual bool IsScriptable() const { return true; }
|
2004-01-27 00:05:58 +03:00
|
|
|
|
2003-07-08 01:47:17 +04:00
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2016-05-16 17:34:04 +03:00
|
|
|
virtual std::string GetName() const { return "file"; }
|
2003-07-08 01:47:17 +04:00
|
|
|
|
|
|
|
cmTypeMacro(cmFileCommand, cmCommand);
|
|
|
|
|
|
|
|
protected:
|
2009-04-15 17:58:13 +04:00
|
|
|
bool HandleRename(std::vector<std::string> const& args);
|
2006-03-09 22:30:35 +03:00
|
|
|
bool HandleRemove(std::vector<std::string> const& args, bool recurse);
|
2003-07-08 01:47:17 +04:00
|
|
|
bool HandleWriteCommand(std::vector<std::string> const& args, bool append);
|
|
|
|
bool HandleReadCommand(std::vector<std::string> const& args);
|
2011-11-16 05:39:36 +04:00
|
|
|
bool HandleHashCommand(std::vector<std::string> const& args);
|
2007-04-26 01:22:07 +04:00
|
|
|
bool HandleStringsCommand(std::vector<std::string> const& args);
|
2003-07-14 17:15:13 +04:00
|
|
|
bool HandleGlobCommand(std::vector<std::string> const& args, bool recurse);
|
2003-07-09 00:33:29 +04:00
|
|
|
bool HandleMakeDirectoryCommand(std::vector<std::string> const& args);
|
2007-06-07 21:51:17 +04:00
|
|
|
|
2005-10-17 17:10:20 +04:00
|
|
|
bool HandleRelativePathCommand(std::vector<std::string> const& args);
|
2006-04-05 15:46:32 +04:00
|
|
|
bool HandleCMakePathCommand(std::vector<std::string> const& args,
|
|
|
|
bool nativePath);
|
2008-04-14 23:02:44 +04:00
|
|
|
bool HandleRPathChangeCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleRPathCheckCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleRPathRemoveCommand(std::vector<std::string> const& args);
|
2009-01-07 22:16:35 +03:00
|
|
|
bool HandleDifferentCommand(std::vector<std::string> const& args);
|
2007-06-07 21:51:17 +04:00
|
|
|
|
2009-04-29 21:13:29 +04:00
|
|
|
bool HandleCopyCommand(std::vector<std::string> const& args);
|
ENH: merge CMake-CrossCompileBasic to HEAD
-add a RESULT_VARIABLE to INCLUDE()
-add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain
-have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system)
-use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to
run the executables if they have a different suffix because they are
probably crosscompiled, but nevertheless it should be able to find them
-make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE
-support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.)
-move ranlib on OSX from the file command to a command in executed in cmake_install.cmake
-add support for stripping during install in cmake_install.cmake
-split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools
-remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms
-create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these
-add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a
list of directories which will be prepended to all search directories, right
now as a cmake variable, turning it into a global cmake property may need
some more work
-remove cmTestTestHandler::TryExecutable(), it's unused
-split cmFileCommand::HandleInstall() into slightly smaller functions
Alex
2007-05-17 21:20:44 +04:00
|
|
|
bool HandleInstallCommand(std::vector<std::string> const& args);
|
2008-02-06 17:35:02 +03:00
|
|
|
bool HandleDownloadCommand(std::vector<std::string> const& args);
|
2011-02-23 21:53:53 +03:00
|
|
|
bool HandleUploadCommand(std::vector<std::string> const& args);
|
2012-10-05 23:55:07 +04:00
|
|
|
|
|
|
|
bool HandleTimestampCommand(std::vector<std::string> const& args);
|
2013-01-02 20:10:04 +04:00
|
|
|
bool HandleGenerateCommand(std::vector<std::string> const& args);
|
2014-11-26 01:49:25 +03:00
|
|
|
bool HandleLockCommand(std::vector<std::string> const& args);
|
2013-01-02 20:10:04 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-16 17:34:04 +03:00
|
|
|
void AddEvaluationFile(const std::string& inputName,
|
|
|
|
const std::string& outputExpr,
|
|
|
|
const std::string& condition, bool inputIsContent);
|
2003-07-08 01:47:17 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|