summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.h
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-09-10 19:44:48 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-09-10 20:13:11 (GMT)
commit8a18bb7cdf2478d68e11a5e532b5134ea92b3678 (patch)
treee0210e119c21d5326041969831ed2e97b1ed413c /Source/cmFindPackageCommand.h
parent95d4a2d05562c5f0a4113527d31dadef4d7756bd (diff)
downloadCMake-8a18bb7cdf2478d68e11a5e532b5134ea92b3678.zip
CMake-8a18bb7cdf2478d68e11a5e532b5134ea92b3678.tar.gz
CMake-8a18bb7cdf2478d68e11a5e532b5134ea92b3678.tar.bz2
cmFind*: Port away from cmCommand
Diffstat (limited to 'Source/cmFindPackageCommand.h')
-rw-r--r--Source/cmFindPackageCommand.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index d57b38a..78b4985 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -3,9 +3,7 @@
#ifndef cmFindPackageCommand_h
#define cmFindPackageCommand_h
-#include "cmCommand.h"
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmPolicies.h"
#include "cm_kwiml.h"
#include <cstddef>
@@ -15,7 +13,8 @@
#include <string>
#include <vector>
-#include "cm_memory.hxx"
+#include "cmFindCommon.h"
+#include "cmPolicies.h"
// IWYU insists we should forward-declare instead of including <functional>,
// but we cannot forward-declare reliably because some C++ standard libraries
@@ -28,8 +27,6 @@ namespace std {
/* clang-format on */
#endif
-#include "cmFindCommon.h"
-
class cmExecutionStatus;
class cmSearchPath;
@@ -62,22 +59,9 @@ public:
std::vector<std::string>::iterator end, SortOrderType order,
SortDirectionType dir);
- cmFindPackageCommand();
+ cmFindPackageCommand(cmExecutionStatus& status);
- /**
- * This is a virtual constructor for the command.
- */
- std::unique_ptr<cmCommand> Clone() override
- {
- return cm::make_unique<cmFindPackageCommand>();
- }
-
- /**
- * 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;
+ bool InitialPass(std::vector<std::string> const& args);
private:
class PathLabel : public cmFindCommon::PathLabel
@@ -246,4 +230,7 @@ struct hash<cmFindPackageCommand::ConfigFileInfo>
};
}
+bool cmFindPackage(std::vector<std::string> const& args,
+ cmExecutionStatus& status);
+
#endif