MCPcopy Create free account
hub / github.com/Kitware/CMake / cmCMakePath

Class cmCMakePath

Source/cmCMakePath.h:84–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84class cmCMakePath
85{
86private:
87 template <typename Source>
88 using enable_if_move_pathable =
89 cm::enable_if_t<detail::is_move_pathable<Source>::value, cmCMakePath&>;
90
91 template <typename Source>
92 using enable_if_pathable =
93 cm::enable_if_t<detail::is_pathable<Source>::value, cmCMakePath&>;
94
95public:
96 using value_type = cm::filesystem::path::value_type;
97 using string_type = cm::filesystem::path::string_type;
98
99 enum format : unsigned char
100 {
101 auto_format =
102 static_cast<unsigned char>(cm::filesystem::path::format::auto_format),
103 native_format =
104 static_cast<unsigned char>(cm::filesystem::path::format::native_format),
105 generic_format =
106 static_cast<unsigned char>(cm::filesystem::path::format::generic_format)
107 };
108
109 class iterator;
110 using const_iterator = iterator;
111
112 cmCMakePath() noexcept = default;
113
114 cmCMakePath(cmCMakePath const&) = default;
115
116 cmCMakePath(cmCMakePath&& path) noexcept
117 : Path(std::forward<cm::filesystem::path>(path.Path))
118 {
119 }
120
121 cmCMakePath(cm::filesystem::path path) noexcept
122 : Path(std::move(path))
123 {
124 }
125 cmCMakePath(cm::string_view source, format fmt = generic_format) noexcept
126 : Path(FormatPath(source, fmt))
127 {
128 }
129 cmCMakePath(char const* source, format fmt = generic_format) noexcept
130 : Path(FormatPath(cm::string_view{ source }, fmt))
131 {
132 }
133#if defined(__SUNPRO_CC) && defined(__sparc)
134 // Oracle DeveloperStudio C++ compiler on Solaris/Sparc is confused when
135 // standard methods and templates use the same name. The template is selected
136 // rather than the standard one regardless the arguments of the method.
137 cmCMakePath(std::string const& source, format fmt = generic_format)
138 : Path(FormatPath(source, fmt))
139 {
140 }
141 cmCMakePath(std::string&& source, format fmt = generic_format)

Callers 15

NormalizePathMethod · 0.85
HandleDirectoryModeFunction · 0.85
operator()Method · 0.85
ClearDependenciesMethod · 0.85
NormalizeFindResultMethod · 0.85
ProcessLineMethod · 0.85
HandleSetCommandFunction · 0.85
HandleNormalPathCommandFunction · 0.85
HandleConvertCommandFunction · 0.85
HandleIsAbsoluteCommandFunction · 0.85

Calls 3

moveFunction · 0.85
AppendMethod · 0.45
stringMethod · 0.45

Tested by 1

ParseArgumentsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…