diff options
author | Brad King <brad.king@kitware.com> | 2015-07-08 19:24:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 13:50:06 (GMT) |
commit | cdb5b65752c5a009ac3bb7425637da808a7a9bca (patch) | |
tree | 14c31339b4c0c384bec7afc61d40b247fe5a611a /Source/cmMakefileTargetGenerator.cxx | |
parent | beee79373222ea01008cd137dd9a3ffa59cbe347 (diff) | |
download | CMake-cdb5b65752c5a009ac3bb7425637da808a7a9bca.zip CMake-cdb5b65752c5a009ac3bb7425637da808a7a9bca.tar.gz CMake-cdb5b65752c5a009ac3bb7425637da808a7a9bca.tar.bz2 |
cmCommonTargetGenerator: Adopt ModuleDefinitionFile member
De-duplicate the ModuleDefinitionFile and AddModuleDefinitionFlag
members from the Makefile and Ninja target generators.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 42fb89c..fe6b4f6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1668,11 +1668,9 @@ void cmMakefileTargetGenerator this->AppendTargetDepends(depends); // Add a dependency on the link definitions file, if any. - std::string def = this->GeneratorTarget->GetModuleDefinitionFile( - this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); - if(!def.empty()) + if(!this->ModuleDefinitionFile.empty()) { - depends.push_back(def); + depends.push_back(this->ModuleDefinitionFile); } // Add user-specified dependencies. @@ -2074,28 +2072,3 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags) } } } - -//---------------------------------------------------------------------------- -void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags) -{ - std::string def = this->GeneratorTarget->GetModuleDefinitionFile( - this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); - if(def.empty()) - { - return; - } - - // TODO: Create a per-language flag variable. - const char* defFileFlag = - this->Makefile->GetDefinition("CMAKE_LINK_DEF_FILE_FLAG"); - if(!defFileFlag) - { - return; - } - - // Append the flag and value. Use ConvertToLinkReference to help - // vs6's "cl -link" pass it to the linker. - std::string flag = defFileFlag; - flag += (this->LocalGenerator->ConvertToLinkReference(def)); - this->LocalGenerator->AppendFlags(flags, flag); -} |