cmAddDefinitionsCommand.cxx 1.0 KB

12345678910111213141516171819202122232425262728
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmAddDefinitionsCommand.h"
  11. // cmAddDefinitionsCommand
  12. bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args,
  13. cmExecutionStatus&)
  14. {
  15. // it is OK to have no arguments
  16. if (args.empty()) {
  17. return true;
  18. }
  19. for (std::vector<std::string>::const_iterator i = args.begin();
  20. i != args.end(); ++i) {
  21. this->Makefile->AddDefineFlag(i->c_str());
  22. }
  23. return true;
  24. }