cmLoadCacheCommand.cxx 906 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #include "cmLoadCacheCommand.h"
  12. // cmLoadcacheCommand
  13. bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args)
  14. {
  15. if (args.size()< 1)
  16. {
  17. this->SetError("called with wrong number of arguments.");
  18. }
  19. for( unsigned int i=0; i< args.size(); i++)
  20. {
  21. m_Makefile->ExpandVariablesInString( args[i]);
  22. cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false);
  23. cmCacheManager::GetInstance()->DefineCache(m_Makefile);
  24. }
  25. return true;
  26. }