cmake/Source/cmFileInstaller.h

55 lines
1.6 KiB
C
Raw Normal View History

2019-11-11 23:01:05 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2019-11-11 23:01:05 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
#include "cmFileCopier.h"
2021-11-20 13:41:27 +01:00
#include "cmInstallMode.h"
2020-02-01 23:06:01 +01:00
#include "cmInstallType.h"
class cmExecutionStatus;
2019-11-11 23:01:05 +01:00
struct cmFileInstaller : public cmFileCopier
{
2020-02-01 23:06:01 +01:00
cmFileInstaller(cmExecutionStatus& status);
2019-11-11 23:01:05 +01:00
~cmFileInstaller() override;
protected:
2022-08-04 22:12:04 +02:00
cmInstallType InstallType = cmInstallType_FILES;
cmInstallMode InstallMode = cmInstallMode::COPY;
bool Optional = false;
bool MessageAlways = false;
bool MessageLazy = false;
bool MessageNever = false;
int DestDirLength = 0;
2019-11-11 23:01:05 +01:00
std::string Rename;
std::string Manifest;
void ManifestAppend(std::string const& file);
std::string const& ToName(std::string const& fromName) override;
void ReportCopy(const std::string& toFile, Type type, bool copy) override;
bool ReportMissing(const std::string& fromFile) override;
bool Install(const std::string& fromFile,
const std::string& toFile) override;
2021-11-20 13:41:27 +01:00
bool InstallFile(const std::string& fromFile, const std::string& toFile,
MatchProperties match_properties) override;
2019-11-11 23:01:05 +01:00
bool Parse(std::vector<std::string> const& args) override;
enum
{
DoingType = DoingLast1,
DoingRename,
DoingLast2
};
bool CheckKeyword(std::string const& arg) override;
bool CheckValue(std::string const& arg) override;
void DefaultFilePermissions() override;
bool GetTargetTypeFromString(const std::string& stype);
bool HandleInstallDestination();
};