diff options
author | Brad King <brad.king@kitware.com> | 2015-05-18 17:31:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-18 19:01:06 (GMT) |
commit | a390de65e09e3ebc496fc14d40848ea4940cc9b0 (patch) | |
tree | f8d2c58ba7b46117e408af8378cfd79a3e370f5f /Source/cmNinjaTargetGenerator.cxx | |
parent | 00ccfff2bc06e640a185fb3d628ac36ea0b0fe9a (diff) | |
download | CMake-a390de65e09e3ebc496fc14d40848ea4940cc9b0.zip CMake-a390de65e09e3ebc496fc14d40848ea4940cc9b0.tar.gz CMake-a390de65e09e3ebc496fc14d40848ea4940cc9b0.tar.bz2 |
Ninja: Generate separate compile and link rules for each target
Our <LANG>_COMPILER and <LANG>_<TARGET_TYPE>_LINKER rule generation has
access to a specific cmTarget so the results may depend on it. Instead
generate separate rules for each target using an encoded target name.
In particular, this makes CTEST_USE_LAUNCHERS report proper target
information.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 128a35b..cdc9cc8 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -97,6 +97,13 @@ std::string const& cmNinjaTargetGenerator::GetConfigName() const return this->LocalGenerator->GetConfigName(); } +std::string cmNinjaTargetGenerator::LanguageCompilerRule( + const std::string& lang) const +{ + return lang + "_COMPILER__" + + cmGlobalNinjaGenerator::EncodeRuleName(this->Target->GetName()); +} + // TODO: Picked up from cmMakefileTargetGenerator. Refactor it. const char* cmNinjaTargetGenerator::GetFeature(const std::string& feature) { |