summaryrefslogtreecommitdiffstats
path: root/Source/cmExecProgramCommand.h
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-07-25 15:01:45 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-20 18:42:19 (GMT)
commit0d87f5d83e52ceb72f754331a9fd3d7189680297 (patch)
treefae2a6886cc53008a9ff63a6565ea51630d5e2ab /Source/cmExecProgramCommand.h
parent0005e17d504fd50ebaec3860f4f213765e815b13 (diff)
downloadCMake-0d87f5d83e52ceb72f754331a9fd3d7189680297.zip
CMake-0d87f5d83e52ceb72f754331a9fd3d7189680297.tar.gz
CMake-0d87f5d83e52ceb72f754331a9fd3d7189680297.tar.bz2
cmCommand refactor: cmExecProgramCommand
Diffstat (limited to 'Source/cmExecProgramCommand.h')
-rw-r--r--Source/cmExecProgramCommand.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h
index 70f833a..7c751e1 100644
--- a/Source/cmExecProgramCommand.h
+++ b/Source/cmExecProgramCommand.h
@@ -8,43 +8,16 @@
#include <string>
#include <vector>
-#include "cm_memory.hxx"
-
-#include "cmCommand.h"
-#include "cmProcessOutput.h"
-
class cmExecutionStatus;
-/** \class cmExecProgramCommand
+/**
* \brief Command that adds a target to the build system.
*
* cmExecProgramCommand adds an extra target to the build system.
* This is useful when you would like to add special
* targets like "install,", "clean," and so on.
*/
-class cmExecProgramCommand : public cmCommand
-{
-public:
- typedef cmProcessOutput::Encoding Encoding;
- /**
- * This is a virtual constructor for the command.
- */
- std::unique_ptr<cmCommand> Clone() override
- {
- return cm::make_unique<cmExecProgramCommand>();
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
- bool InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus& status) override;
-
-private:
- static bool RunCommand(std::string command, std::string& output, int& retVal,
- const char* directory = nullptr, bool verbose = true,
- Encoding encoding = cmProcessOutput::Auto);
-};
+bool cmExecProgramCommand(std::vector<std::string> const& args,
+ cmExecutionStatus& status);
#endif