| 2364 | } |
| 2365 | |
| 2366 | void 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 | |
| 2393 | namespace { |
| 2394 | bool CheckLinkLibraryPattern(UsageRequirementProperty const& usage, |
no test coverage detected