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

Method AppendBuildInterfaceIncludes

Source/cmTarget.cxx:2366–2391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2364}
2365
2366void cmTarget::AppendBuildInterfaceIncludes()
2367{
2368 if (this->GetType() != cmStateEnums::SHARED_LIBRARY &&
2369 this->GetType() != cmStateEnums::STATIC_LIBRARY &&
2370 this->GetType() != cmStateEnums::MODULE_LIBRARY &&
2371 this->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
2372 !this->IsExecutableWithExports()) {
2373 return;
2374 }
2375 if (this->impl->BuildInterfaceIncludesAppended) {
2376 return;
2377 }
2378 this->impl->BuildInterfaceIncludesAppended = true;
2379
2380 if (this->impl->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE")) {
2381 std::string dirs = this->impl->Makefile->GetCurrentBinaryDirectory();
2382 if (!dirs.empty()) {
2383 dirs += ';';
2384 }
2385 dirs += this->impl->Makefile->GetCurrentSourceDirectory();
2386 if (!dirs.empty()) {
2387 this->AppendProperty("INTERFACE_INCLUDE_DIRECTORIES",
2388 ("$<BUILD_INTERFACE:" + dirs + ">"));
2389 }
2390 }
2391}
2392
2393namespace {
2394bool CheckLinkLibraryPattern(UsageRequirementProperty const& usage,

Callers 3

GenerateMainFileMethod · 0.80
GenerateMainFileMethod · 0.80

Calls 5

GetTypeMethod · 0.95
AppendPropertyMethod · 0.95
IsOnMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected