diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-05-17 15:29:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-20 15:05:16 (GMT) |
commit | 3205c7c950d5b90d47ce1c5c58073e511339b78c (patch) | |
tree | 6ab0918cb04745d547e1c9dfcd0672f15cc15afe | |
parent | 66efdbd21a46b63572f5de677ed126a68e524e7a (diff) | |
download | CMake-3205c7c950d5b90d47ce1c5c58073e511339b78c.zip CMake-3205c7c950d5b90d47ce1c5c58073e511339b78c.tar.gz CMake-3205c7c950d5b90d47ce1c5c58073e511339b78c.tar.bz2 |
cmNinjaLinkLineDeviceComputer now lives in the correct source file
-rw-r--r-- | Source/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/cmLinkLineDeviceComputer.cxx | 15 | ||||
-rw-r--r-- | Source/cmLinkLineDeviceComputer.h | 18 | ||||
-rw-r--r-- | Source/cmNinjaLinkLineDeviceComputer.cxx | 20 | ||||
-rw-r--r-- | Source/cmNinjaLinkLineDeviceComputer.h | 34 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 2 |
6 files changed, 57 insertions, 34 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 42eed4d..d7a0f3e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -786,6 +786,8 @@ set(SRCS ${SRCS} cmNinjaUtilityTargetGenerator.h cmNinjaLinkLineComputer.cxx cmNinjaLinkLineComputer.h + cmNinjaLinkLineDeviceComputer.cxx + cmNinjaLinkLineDeviceComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index 211d03b..72edba3 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -10,7 +10,6 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" -#include "cmGlobalNinjaGenerator.h" #include "cmStateTypes.h" class cmOutputConverter; @@ -117,17 +116,3 @@ std::string cmLinkLineDeviceComputer::GetLinkerLanguage(cmGeneratorTarget*, { return "CUDA"; } - -cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer( - cmOutputConverter* outputConverter, cmStateDirectory const& stateDir, - cmGlobalNinjaGenerator const* gg) - : cmLinkLineDeviceComputer(outputConverter, stateDir) - , GG(gg) -{ -} - -std::string cmNinjaLinkLineDeviceComputer::ConvertToLinkReference( - std::string const& lib) const -{ - return GG->ConvertToNinjaPath(lib); -} diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h index cf66f64..26fc125 100644 --- a/Source/cmLinkLineDeviceComputer.h +++ b/Source/cmLinkLineDeviceComputer.h @@ -12,7 +12,6 @@ class cmComputeLinkInformation; class cmGeneratorTarget; -class cmGlobalNinjaGenerator; class cmOutputConverter; class cmStateDirectory; @@ -34,21 +33,4 @@ public: std::string const& config) override; }; -class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer -{ -public: - cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter, - cmStateDirectory const& stateDir, - cmGlobalNinjaGenerator const* gg); - - cmNinjaLinkLineDeviceComputer(cmNinjaLinkLineDeviceComputer const&) = delete; - cmNinjaLinkLineDeviceComputer& operator=( - cmNinjaLinkLineDeviceComputer const&) = delete; - - std::string ConvertToLinkReference(std::string const& input) const override; - -private: - cmGlobalNinjaGenerator const* GG; -}; - #endif diff --git a/Source/cmNinjaLinkLineDeviceComputer.cxx b/Source/cmNinjaLinkLineDeviceComputer.cxx new file mode 100644 index 0000000..84c1b37 --- /dev/null +++ b/Source/cmNinjaLinkLineDeviceComputer.cxx @@ -0,0 +1,20 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmNinjaLinkLineDeviceComputer.h" + +#include "cmGlobalNinjaGenerator.h" + +cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer( + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir, + cmGlobalNinjaGenerator const* gg) + : cmLinkLineDeviceComputer(outputConverter, stateDir) + , GG(gg) +{ +} + +std::string cmNinjaLinkLineDeviceComputer::ConvertToLinkReference( + std::string const& lib) const +{ + return GG->ConvertToNinjaPath(lib); +} diff --git a/Source/cmNinjaLinkLineDeviceComputer.h b/Source/cmNinjaLinkLineDeviceComputer.h new file mode 100644 index 0000000..84ced5b --- /dev/null +++ b/Source/cmNinjaLinkLineDeviceComputer.h @@ -0,0 +1,34 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmNinjaLinkLineDeviceComputer_h +#define cmNinjaLinkLineDeviceComputer_h + +#include "cmConfigure.h" // IWYU pragma: keep + +#include <string> + +#include "cmLinkLineDeviceComputer.h" + +class cmGlobalNinjaGenerator; +class cmOutputConverter; +class cmStateDirectory; + +class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer +{ +public: + cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter, + cmStateDirectory const& stateDir, + cmGlobalNinjaGenerator const* gg); + + cmNinjaLinkLineDeviceComputer(cmNinjaLinkLineDeviceComputer const&) = delete; + cmNinjaLinkLineDeviceComputer& operator=( + cmNinjaLinkLineDeviceComputer const&) = delete; + + std::string ConvertToLinkReference(std::string const& input) const override; + +private: + cmGlobalNinjaGenerator const* GG; +}; + +#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 680f881..4d13006 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -18,10 +18,10 @@ #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" #include "cmLinkLineComputer.h" -#include "cmLinkLineDeviceComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmNinjaLinkLineDeviceComputer.h" #include "cmNinjaTypes.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" |