diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-05-09 12:51:54 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-05-09 12:51:54 (GMT) |
commit | cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3 (patch) | |
tree | 51c7f3ea41957a192cf95366a123cd3d53df735e /Source/cmLoadCacheCommand.cxx | |
parent | a74d8698eb67337fafe48d2359a9e1bfaa8b1272 (diff) | |
download | CMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.zip CMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.tar.gz CMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.tar.bz2 |
added load cache command and fixed source file
Diffstat (limited to 'Source/cmLoadCacheCommand.cxx')
-rw-r--r-- | Source/cmLoadCacheCommand.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx new file mode 100644 index 0000000..a144773 --- /dev/null +++ b/Source/cmLoadCacheCommand.cxx @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) 2000 National Library of Medicine + All rights reserved. + + See COPYRIGHT.txt for copyright details. + +=========================================================================*/ +#include "cmLoadCacheCommand.h" + +#include <iostream.h> + +// cmLoadcacheCommand +bool cmLoadCacheCommand::Invoke(std::vector<std::string>& args) +{ + if (args.size()< 1) + { + this->SetError("called with wrong number of arguments."); + } + + for( unsigned int i=0; i< args.size(); i++) + { + m_Makefile->ExpandVariablesInString( args[i]); + cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false); + cmCacheManager::GetInstance()->DefineCache(m_Makefile); + } + + return true; +} + + |