diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-23 12:49:54 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-23 14:19:49 (GMT) |
commit | 006229278b54ee92003100773a0430565fb8fe87 (patch) | |
tree | 04a9927d32bf98df5685fde3b0e5be4811e67f8d /Source/cmTarget.cxx | |
parent | 999516478d56d8604d1413fe3c677a860357516c (diff) | |
download | CMake-006229278b54ee92003100773a0430565fb8fe87.zip CMake-006229278b54ee92003100773a0430565fb8fe87.tar.gz CMake-006229278b54ee92003100773a0430565fb8fe87.tar.bz2 |
Use cmAppend to append ranges to std::vector instances
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8b41e28..cd67586 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -34,13 +34,6 @@ #include "cmTargetPropertyComputer.h" #include "cmake.h" -//! Append all elements from the second container to the first container -template <class C, class R> -static inline void CApp(C& container, R const& range) -{ - container.insert(container.end(), range.begin(), range.end()); -} - template <> const char* cmTargetPropertyComputer::ComputeLocationForBuild<cmTarget>( cmTarget const* tgt) @@ -406,29 +399,30 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, if (!this->IsImported()) { // Initialize the INCLUDE_DIRECTORIES property based on the current value // of the same directory property: - CApp(impl->IncludeDirectoriesEntries, - impl->Makefile->GetIncludeDirectoriesEntries()); - CApp(impl->IncludeDirectoriesBacktraces, - impl->Makefile->GetIncludeDirectoriesBacktraces()); + cmAppend(impl->IncludeDirectoriesEntries, + impl->Makefile->GetIncludeDirectoriesEntries()); + cmAppend(impl->IncludeDirectoriesBacktraces, + impl->Makefile->GetIncludeDirectoriesBacktraces()); { auto const& sysInc = impl->Makefile->GetSystemIncludeDirectories(); impl->SystemIncludeDirectories.insert(sysInc.begin(), sysInc.end()); } - CApp(impl->CompileOptionsEntries, - impl->Makefile->GetCompileOptionsEntries()); - CApp(impl->CompileOptionsBacktraces, - impl->Makefile->GetCompileOptionsBacktraces()); + cmAppend(impl->CompileOptionsEntries, + impl->Makefile->GetCompileOptionsEntries()); + cmAppend(impl->CompileOptionsBacktraces, + impl->Makefile->GetCompileOptionsBacktraces()); - CApp(impl->LinkOptionsEntries, impl->Makefile->GetLinkOptionsEntries()); - CApp(impl->LinkOptionsBacktraces, - impl->Makefile->GetLinkOptionsBacktraces()); + cmAppend(impl->LinkOptionsEntries, + impl->Makefile->GetLinkOptionsEntries()); + cmAppend(impl->LinkOptionsBacktraces, + impl->Makefile->GetLinkOptionsBacktraces()); - CApp(impl->LinkDirectoriesEntries, - impl->Makefile->GetLinkDirectoriesEntries()); - CApp(impl->LinkDirectoriesBacktraces, - impl->Makefile->GetLinkDirectoriesBacktraces()); + cmAppend(impl->LinkDirectoriesEntries, + impl->Makefile->GetLinkDirectoriesEntries()); + cmAppend(impl->LinkDirectoriesBacktraces, + impl->Makefile->GetLinkDirectoriesBacktraces()); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && |