diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-07 15:03:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-07 15:03:56 (GMT) |
commit | 2caeffcb20e2677b0d0cd4797734fe91fb863fe3 (patch) | |
tree | 2812e66e49dae021a97675bd9306957876e7e944 /Source/CursesDialog/ccmake.cxx | |
parent | db859464f2d8cc07f6fa5c238c187cd1e3566e5c (diff) | |
download | CMake-2caeffcb20e2677b0d0cd4797734fe91fb863fe3.zip CMake-2caeffcb20e2677b0d0cd4797734fe91fb863fe3.tar.gz CMake-2caeffcb20e2677b0d0cd4797734fe91fb863fe3.tar.bz2 |
ENH: add -B option to specify the build directory, so make edit_cache will work
Diffstat (limited to 'Source/CursesDialog/ccmake.cxx')
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 3ee7692..ae38c79 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -71,9 +71,14 @@ int main(int argc, char** argv) } } + std::string cacheDir = cmSystemTools::GetCurrentWorkingDirectory(); for(i=1; i < args.size(); ++i) { std::string arg = args[i]; + if(arg.find("-B",0) == 0) + { + cacheDir = arg.substr(2); + } if(arg.find("-help",0) != std::string::npos || arg.find("--help",0) != std::string::npos || arg.find("/?",0) != std::string::npos || @@ -86,7 +91,7 @@ int main(int argc, char** argv) cmSystemTools::DisableRunCommandOutput(); - cmCacheManager::GetInstance()->LoadCache(cmSystemTools::GetCurrentWorkingDirectory().c_str()); + cmCacheManager::GetInstance()->LoadCache(cacheDir.c_str()); if (debug) { |