diff options
author | Gabor Bencze <b.gabor98@gmail.com> | 2019-08-09 09:48:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-20 18:42:20 (GMT) |
commit | 413a960391291678f216fe3d2bbfbd3fdca84168 (patch) | |
tree | 97d140067024c88e49a34c29ea675f7b6ad635da /Source/cmCMakeHostSystemInformationCommand.h | |
parent | c33c52bb327d448868cff6aff6d83c786bc81e7e (diff) | |
download | CMake-413a960391291678f216fe3d2bbfbd3fdca84168.zip CMake-413a960391291678f216fe3d2bbfbd3fdca84168.tar.gz CMake-413a960391291678f216fe3d2bbfbd3fdca84168.tar.bz2 |
cmCommand refactor: cmCMakeHostSystemInformationCommand
Diffstat (limited to 'Source/cmCMakeHostSystemInformationCommand.h')
-rw-r--r-- | Source/cmCMakeHostSystemInformationCommand.h | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 8ea2d55..79e3f27 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -5,50 +5,18 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <stddef.h> #include <string> #include <vector> -#include "cm_memory.hxx" - -#include "cmCommand.h" - class cmExecutionStatus; -namespace cmsys { -class SystemInformation; -} // namespace cmsys -/** \class cmCMakeHostSystemInformationCommand +/** * \brief Query host system specific information * * cmCMakeHostSystemInformationCommand queries system information of * the system on which CMake runs. */ -class cmCMakeHostSystemInformationCommand : public cmCommand -{ -public: - /** - * This is a virtual constructor for the command. - */ - std::unique_ptr<cmCommand> Clone() override - { - return cm::make_unique<cmCMakeHostSystemInformationCommand>(); - } - - /** - * 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: - bool GetValue(cmsys::SystemInformation& info, std::string const& key, - std::string& value); - - std::string ValueToString(size_t value) const; - std::string ValueToString(const char* value) const; - std::string ValueToString(std::string const& value) const; -}; +bool cmCMakeHostSystemInformationCommand(std::vector<std::string> const& args, + cmExecutionStatus& status); #endif |