From d9da6ee29fe0267ed347860f24f21be647ac81e8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Aug 2015 19:49:49 +0200 Subject: cmLinkItem: Split to separate file. --- Source/CMakeLists.txt | 1 + Source/cmLinkItem.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ Source/cmTarget.h | 27 +-------------------------- 3 files changed, 49 insertions(+), 26 deletions(-) create mode 100644 Source/cmLinkItem.h diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 92fee8a..428b364 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -288,6 +288,7 @@ set(SRCS cmInstallDirectoryGenerator.h cmInstallDirectoryGenerator.cxx cmLinkedTree.h + cmLinkItem.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h new file mode 100644 index 0000000..da91ed1 --- /dev/null +++ b/Source/cmLinkItem.h @@ -0,0 +1,47 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2004-2015 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmLinkItem_h +#define cmLinkItem_h + +#include "cmListFileCache.h" + +class cmTarget; + +// Basic information about each link item. +class cmLinkItem: public std::string +{ + typedef std::string std_string; +public: + cmLinkItem(): std_string(), Target(0) {} + cmLinkItem(const std_string& n, + cmTarget const* t): std_string(n), Target(t) {} + cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {} + cmTarget const* Target; +}; + +class cmLinkImplItem: public cmLinkItem +{ +public: + cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {} + cmLinkImplItem(std::string const& n, + cmTarget const* t, + cmListFileBacktrace const& bt, + bool fromGenex): + cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {} + cmLinkImplItem(cmLinkImplItem const& r): + cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {} + cmListFileBacktrace Backtrace; + bool FromGenex; +}; + +#endif diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e3fbdfd..c4f3817 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -16,6 +16,7 @@ #include "cmPropertyMap.h" #include "cmPolicies.h" #include "cmListFileCache.h" +#include "cmLinkItem.h" #include #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -52,32 +53,6 @@ class cmTarget; class cmGeneratorTarget; class cmTargetTraceDependencies; -// Basic information about each link item. -class cmLinkItem: public std::string -{ - typedef std::string std_string; -public: - cmLinkItem(): std_string(), Target(0) {} - cmLinkItem(const std_string& n, - cmTarget const* t): std_string(n), Target(t) {} - cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {} - cmTarget const* Target; -}; -class cmLinkImplItem: public cmLinkItem -{ -public: - cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {} - cmLinkImplItem(std::string const& n, - cmTarget const* t, - cmListFileBacktrace const& bt, - bool fromGenex): - cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {} - cmLinkImplItem(cmLinkImplItem const& r): - cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {} - cmListFileBacktrace Backtrace; - bool FromGenex; -}; - class cmTargetInternals; class cmTargetInternalPointer { -- cgit v0.12