summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-08-21 18:50:44 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-26 15:48:46 (GMT)
commitc8deeac68f1462461a464acd6d2c2728b9a293c2 (patch)
tree510248aabe3ec3db117e2cc0d508d91dbb088f64
parentc2c222eba13476a95a362731528d85a3e76ed83a (diff)
downloadCMake-c8deeac68f1462461a464acd6d2c2728b9a293c2.zip
CMake-c8deeac68f1462461a464acd6d2c2728b9a293c2.tar.gz
CMake-c8deeac68f1462461a464acd6d2c2728b9a293c2.tar.bz2
cmCommand refactor: cmSubdirDependsCommand
-rw-r--r--Source/cmCommands.cxx3
-rw-r--r--Source/cmSubdirDependsCommand.cxx4
-rw-r--r--Source/cmSubdirDependsCommand.h16
3 files changed, 5 insertions, 18 deletions
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index cd1b5af..f71be0d 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -320,8 +320,7 @@ void GetProjectCommands(cmState* state)
"output_required_files", cmOutputRequiredFilesCommand, cmPolicies::CMP0032,
"The output_required_files command should not be called; see CMP0032.");
state->AddDisallowedCommand(
- "subdir_depends", cm::make_unique<cmSubdirDependsCommand>(),
- cmPolicies::CMP0029,
+ "subdir_depends", cmSubdirDependsCommand, cmPolicies::CMP0029,
"The subdir_depends command should not be called; see CMP0029.");
state->AddDisallowedCommand(
"utility_source", cm::make_unique<cmUtilitySourceCommand>(),
diff --git a/Source/cmSubdirDependsCommand.cxx b/Source/cmSubdirDependsCommand.cxx
index 0bb2c0a..496c60d 100644
--- a/Source/cmSubdirDependsCommand.cxx
+++ b/Source/cmSubdirDependsCommand.cxx
@@ -4,8 +4,8 @@
class cmExecutionStatus;
-bool cmSubdirDependsCommand::InitialPass(std::vector<std::string> const&,
- cmExecutionStatus&)
+bool cmSubdirDependsCommand(std::vector<std::string> const&,
+ cmExecutionStatus&)
{
return true;
}
diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h
index 64c28b9..bf99bd1 100644
--- a/Source/cmSubdirDependsCommand.h
+++ b/Source/cmSubdirDependsCommand.h
@@ -8,21 +8,9 @@
#include <string>
#include <vector>
-#include "cm_memory.hxx"
-
-#include "cmCommand.h"
-
class cmExecutionStatus;
-class cmSubdirDependsCommand : public cmCommand
-{
-public:
- std::unique_ptr<cmCommand> Clone() override
- {
- return cm::make_unique<cmSubdirDependsCommand>();
- }
- bool InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus& status) override;
-};
+bool cmSubdirDependsCommand(std::vector<std::string> const& args,
+ cmExecutionStatus& status);
#endif