1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "cmLinkLibrariesCommand.h"
- #include "cmMakefile.h"
- class cmExecutionStatus;
- bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus&)
- {
- if (args.empty()) {
- return true;
- }
-
-
- for (std::vector<std::string>::const_iterator i = args.begin();
- i != args.end(); ++i) {
- if (*i == "debug") {
- ++i;
- if (i == args.end()) {
- this->SetError("The \"debug\" argument must be followed by "
- "a library");
- return false;
- }
- this->Makefile->AppendProperty("LINK_LIBRARIES", "debug");
- } else if (*i == "optimized") {
- ++i;
- if (i == args.end()) {
- this->SetError("The \"optimized\" argument must be followed by "
- "a library");
- return false;
- }
- this->Makefile->AppendProperty("LINK_LIBRARIES", "optimized");
- }
- this->Makefile->AppendProperty("LINK_LIBRARIES", i->c_str());
- }
- return true;
- }
|