Commit 3205c7c9 authored by Robert Maynard's avatar Robert Maynard Committed by Brad King

cmNinjaLinkLineDeviceComputer now lives in the correct source file

parent 66efdbd2
......@@ -786,6 +786,8 @@ set(SRCS ${SRCS}
cmNinjaUtilityTargetGenerator.h
cmNinjaLinkLineComputer.cxx
cmNinjaLinkLineComputer.h
cmNinjaLinkLineDeviceComputer.cxx
cmNinjaLinkLineDeviceComputer.h
)
# Temporary variable for tools targets
......
......@@ -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);
}
......@@ -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
/* 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);
}
/* 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
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment