cmLoadCacheCommand.cxx 923 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include <iostream.h>
  13. // cmLoadcacheCommand
  14. bool cmLoadCacheCommand::Invoke(std::vector<std::string>& args)
  15. {
  16. if (args.size()< 1)
  17. {
  18. this->SetError("called with wrong number of arguments.");
  19. }
  20. for( unsigned int i=0; i< args.size(); i++)
  21. {
  22. m_Makefile->ExpandVariablesInString( args[i]);
  23. cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false);
  24. cmCacheManager::GetInstance()->DefineCache(m_Makefile);
  25. }
  26. return true;
  27. }