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

Method SetProperty

Source/cmSourceFile.cxx:301–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void cmSourceFile::SetProperty(std::string const& prop, cmValue value)
302{
303 if (prop == propINCLUDE_DIRECTORIES) {
304 this->IncludeDirectories.clear();
305 if (value) {
306 cmListFileBacktrace lfbt = this->Location.GetMakefile()->GetBacktrace();
307 this->IncludeDirectories.emplace_back(value, lfbt);
308 }
309 } else if (prop == propCOMPILE_OPTIONS) {
310 this->CompileOptions.clear();
311 if (value) {
312 cmListFileBacktrace lfbt = this->Location.GetMakefile()->GetBacktrace();
313 this->CompileOptions.emplace_back(value, lfbt);
314 }
315 } else if (prop == propCOMPILE_DEFINITIONS) {
316 this->CompileDefinitions.clear();
317 if (value) {
318 cmListFileBacktrace lfbt = this->Location.GetMakefile()->GetBacktrace();
319 this->CompileDefinitions.emplace_back(value, lfbt);
320 }
321 } else {
322 this->Properties.SetProperty(prop, value);
323 }
324}
325
326void cmSourceFile::AppendProperty(std::string const& prop,
327 std::string const& value, bool asString)

Callers 1

CheckExtensionMethod · 0.95

Calls 4

emplace_backMethod · 0.80
clearMethod · 0.45
GetBacktraceMethod · 0.45
GetMakefileMethod · 0.45

Tested by

no test coverage detected