summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-04-26 20:22:53 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-04-26 20:22:53 (GMT)
commit41e1270413b18272bc73a8b25150aad4c7913563 (patch)
tree97d507f6296c78e5aaf17e1858e610cf95c46ba7 /Source/cmLinkLibrariesCommand.cxx
parent888e47ddb4215659e76673af4f18aba865ccc4b8 (diff)
downloadCMake-41e1270413b18272bc73a8b25150aad4c7913563.zip
CMake-41e1270413b18272bc73a8b25150aad4c7913563.tar.gz
CMake-41e1270413b18272bc73a8b25150aad4c7913563.tar.bz2
support for debug and opt libraries
Diffstat (limited to 'Source/cmLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmLinkLibrariesCommand.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx
index 4215147..e06fce8 100644
--- a/Source/cmLinkLibrariesCommand.cxx
+++ b/Source/cmLinkLibrariesCommand.cxx
@@ -23,10 +23,27 @@ bool cmLinkLibrariesCommand::Invoke(std::vector<std::string>& args)
this->SetError("called with incorrect number of arguments");
return false;
}
+ // add libraries, nothe that there is an optional prefix
+ // of debug and optimized than can be used
for(std::vector<std::string>::iterator i = args.begin();
i != args.end(); ++i)
{
- m_Makefile->AddLinkLibrary((*i).c_str());
+ if (*i == "debug")
+ {
+ ++i;
+ m_Makefile->AddLinkLibrary(i->c_str(),
+ cmMakefile::DEBUG);
+ }
+ else if (*i == "optimized")
+ {
+ ++i;
+ m_Makefile->AddLinkLibrary(i->c_str(),
+ cmMakefile::OPTIMIZED);
+ }
+ else
+ {
+ m_Makefile->AddLinkLibrary(i->c_str());
+ }
}
return true;
}