mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-04 04:54:17 +08:00

Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
78 lines
2.0 KiB
C++
78 lines
2.0 KiB
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#pragma once
|
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "cmGeneratorExpression.h"
|
|
|
|
class cmMakefile;
|
|
|
|
/** \class cmInstalledFile
|
|
* \brief Represents a file intended for installation.
|
|
*
|
|
* cmInstalledFile represents a file intended for installation.
|
|
*/
|
|
class cmInstalledFile
|
|
{
|
|
public:
|
|
using CompiledGeneratorExpressionPtrType =
|
|
std::unique_ptr<cmCompiledGeneratorExpression>;
|
|
|
|
using ExpressionVectorType = std::vector<CompiledGeneratorExpressionPtrType>;
|
|
|
|
struct Property
|
|
{
|
|
Property();
|
|
~Property();
|
|
|
|
Property(Property const&) = delete;
|
|
Property& operator=(Property const&) = delete;
|
|
|
|
ExpressionVectorType ValueExpressions;
|
|
};
|
|
|
|
using PropertyMapType = std::map<std::string, Property>;
|
|
|
|
cmInstalledFile();
|
|
|
|
~cmInstalledFile();
|
|
|
|
cmInstalledFile(cmInstalledFile const&) = delete;
|
|
cmInstalledFile& operator=(cmInstalledFile const&) = delete;
|
|
|
|
void RemoveProperty(std::string const& prop);
|
|
|
|
void SetProperty(cmMakefile const* mf, std::string const& prop,
|
|
std::string const& value);
|
|
|
|
void AppendProperty(cmMakefile const* mf, std::string const& prop,
|
|
std::string const& value, bool asString = false);
|
|
|
|
bool HasProperty(std::string const& prop) const;
|
|
|
|
bool GetProperty(std::string const& prop, std::string& value) const;
|
|
|
|
bool GetPropertyAsBool(std::string const& prop) const;
|
|
|
|
std::vector<std::string> GetPropertyAsList(std::string const& prop) const;
|
|
|
|
void SetName(cmMakefile* mf, std::string const& name);
|
|
|
|
std::string const& GetName() const;
|
|
|
|
cmCompiledGeneratorExpression const& GetNameExpression() const;
|
|
|
|
PropertyMapType const& GetProperties() const { return this->Properties; }
|
|
|
|
private:
|
|
std::string Name;
|
|
CompiledGeneratorExpressionPtrType NameExpression;
|
|
PropertyMapType Properties;
|
|
};
|