1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
12 #include "cmGeneratorExpression.h"
16 /** \class cmInstalledFile
17 * \brief Represents a file intended for installation.
19 * cmInstalledFile represents a file intended for installation.
24 using CompiledGeneratorExpressionPtrType
=
25 std::unique_ptr
<cmCompiledGeneratorExpression
>;
27 using ExpressionVectorType
= std::vector
<CompiledGeneratorExpressionPtrType
>;
34 Property(const Property
&) = delete;
35 Property
& operator=(const Property
&) = delete;
37 ExpressionVectorType ValueExpressions
;
40 using PropertyMapType
= std::map
<std::string
, Property
>;
46 cmInstalledFile(const cmInstalledFile
&) = delete;
47 cmInstalledFile
& operator=(const cmInstalledFile
&) = delete;
49 void RemoveProperty(const std::string
& prop
);
51 void SetProperty(cmMakefile
const* mf
, const std::string
& prop
,
52 const std::string
& value
);
54 void AppendProperty(cmMakefile
const* mf
, const std::string
& prop
,
55 const std::string
& value
, bool asString
= false);
57 bool HasProperty(const std::string
& prop
) const;
59 bool GetProperty(const std::string
& prop
, std::string
& value
) const;
61 bool GetPropertyAsBool(const std::string
& prop
) const;
63 std::vector
<std::string
> GetPropertyAsList(const std::string
& prop
) const;
65 void SetName(cmMakefile
* mf
, const std::string
& name
);
67 std::string
const& GetName() const;
69 cmCompiledGeneratorExpression
const& GetNameExpression() const;
71 PropertyMapType
const& GetProperties() const { return this->Properties
; }
75 CompiledGeneratorExpressionPtrType NameExpression
;
76 PropertyMapType Properties
;