From e72535fda75454433d543c771bc5402cd238d3ed Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 29 Apr 2003 10:04:05 -0400 Subject: [PATCH] ENH: Add additional optional argument to Run. If it is true, it will only set paths and load cache. It will not do configure and gfenerate --- Source/cmake.cxx | 7 ++++++- Source/cmake.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f3e355b3a2..96902ab1b3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -909,7 +909,7 @@ bool cmake::CacheVersionMatches() } // handle a command line invocation -int cmake::Run(const std::vector& args) +int cmake::Run(const std::vector& args, bool noconfigure) { // Process the arguments this->SetArgs(args); @@ -941,6 +941,11 @@ int cmake::Run(const std::vector& args) std::string systemFile = this->GetHomeOutputDirectory(); systemFile += "/CMakeSystem.cmake"; + if ( noconfigure ) + { + return 0; + } + int ret = 0; // if not local or the cmake version has changed since the last run // of cmake, or CMakeSystem.cmake file is not in the root binary diff --git a/Source/cmake.h b/Source/cmake.h index ab7a15b774..376a71d5d6 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -119,7 +119,9 @@ class cmake /** * Handle a command line invocation of cmake. */ - int Run(const std::vector&args); + int Run(const std::vector&args) + { this->Run(args, false); } + int Run(const std::vector&args, bool noconfigure); /** * Generate the SourceFilesList from the SourceLists. This should only be