mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
`include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 13. Some patterns: * Types named in virtual `override` signatures no longer require includes since the overridden signature already names them. * A function argument's type needs to be included even if its constructor is called only by implicit conversion. For example, constructing a `std::function` from a lambda now requires `<functional>`. * Some prior mysterious `<type_traits>` inclusions are no longer required.
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file LICENSE.rst or https://cmake.org/licensing for details. */
|
|
#pragma once
|
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
#include <string>
|
|
|
|
#include "cmFileCopier.h"
|
|
#include "cmInstallMode.h"
|
|
#include "cmInstallType.h"
|
|
|
|
class cmExecutionStatus;
|
|
|
|
struct cmFileInstaller : public cmFileCopier
|
|
{
|
|
cmFileInstaller(cmExecutionStatus& status);
|
|
~cmFileInstaller() override;
|
|
|
|
protected:
|
|
cmInstallType InstallType = cmInstallType_FILES;
|
|
cmInstallMode InstallMode = cmInstallMode::COPY;
|
|
bool Optional = false;
|
|
bool MessageAlways = false;
|
|
bool MessageLazy = false;
|
|
bool MessageNever = false;
|
|
int DestDirLength = 0;
|
|
std::string Rename;
|
|
|
|
std::string Manifest;
|
|
void ManifestAppend(std::string const& file);
|
|
|
|
std::string const& ToName(std::string const& fromName) override;
|
|
|
|
void ReportCopy(std::string const& toFile, Type type, bool copy) override;
|
|
bool ReportMissing(std::string const& fromFile) override;
|
|
bool Install(std::string const& fromFile,
|
|
std::string const& toFile) override;
|
|
bool InstallFile(std::string const& fromFile, std::string const& toFile,
|
|
MatchProperties match_properties) override;
|
|
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(std::string const& stype);
|
|
bool HandleInstallDestination();
|
|
};
|