2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2012-04-19 19:04:21 +03:00
|
|
|
#ifndef cmNinjaNormalTargetGenerator_h
|
2016-07-09 11:21:54 +02:00
|
|
|
#define cmNinjaNormalTargetGenerator_h
|
2012-04-19 19:04:21 +03:00
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2012-08-04 10:26:08 +03:00
|
|
|
|
2016-10-30 18:24:19 +01:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2012-04-19 19:04:21 +03:00
|
|
|
|
2020-02-01 23:06:01 +01:00
|
|
|
#include "cmGeneratorTarget.h"
|
|
|
|
#include "cmNinjaTargetGenerator.h"
|
|
|
|
|
2012-04-19 19:04:21 +03:00
|
|
|
class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
|
|
|
|
{
|
|
|
|
public:
|
2014-08-03 19:52:23 +02:00
|
|
|
cmNinjaNormalTargetGenerator(cmGeneratorTarget* target);
|
2018-01-26 17:06:56 +01:00
|
|
|
~cmNinjaNormalTargetGenerator() override;
|
2012-04-19 19:04:21 +03:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
void Generate(const std::string& config) override;
|
2012-04-19 19:04:21 +03:00
|
|
|
|
|
|
|
private:
|
2020-08-30 11:54:41 +02:00
|
|
|
std::string LanguageLinkerRule(const std::string& config) const;
|
|
|
|
std::string LanguageLinkerDeviceRule(const std::string& config) const;
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2012-04-19 19:04:21 +03:00
|
|
|
const char* GetVisibleTypeName() const;
|
2020-08-30 11:54:41 +02:00
|
|
|
void WriteLanguagesRules(const std::string& config);
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
void WriteLinkRule(bool useResponseFile, const std::string& config);
|
|
|
|
void WriteDeviceLinkRule(bool useResponseFile, const std::string& config);
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
void WriteLinkStatement(const std::string& config,
|
|
|
|
const std::string& fileConfig, bool firstForConfig);
|
|
|
|
void WriteDeviceLinkStatement(const std::string& config,
|
|
|
|
const std::string& fileConfig,
|
|
|
|
bool firstForConfig);
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
void WriteObjectLibStatement(const std::string& config);
|
2017-04-14 19:02:05 +02:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
std::vector<std::string> ComputeLinkCmd(const std::string& config);
|
2017-04-14 19:02:05 +02:00
|
|
|
std::vector<std::string> ComputeDeviceLinkCmd();
|
2012-04-19 19:04:21 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Target name info.
|
2020-08-30 11:54:41 +02:00
|
|
|
cmGeneratorTarget::Names TargetNames(const std::string& config) const;
|
|
|
|
std::string TargetLinkLanguage(const std::string& config) const;
|
2017-04-14 19:02:05 +02:00
|
|
|
std::string DeviceLinkObject;
|
2012-04-19 19:04:21 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ! cmNinjaNormalTargetGenerator_h
|