diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-10 18:06:26 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-10 18:06:26 (GMT) |
commit | 634343c3e8c395318d4b6d9e90d97f2a59ec3ae7 (patch) | |
tree | c057576ccfa77d9f6dea07215f4ea3d9de1eb3d5 /Source/cmakewizard.cxx | |
parent | f01afc89f50e68af3f652437dc350d181fd097b7 (diff) | |
download | CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.zip CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.tar.gz CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.tar.bz2 |
STYLE: Fix some style issues
Diffstat (limited to 'Source/cmakewizard.cxx')
-rw-r--r-- | Source/cmakewizard.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx index 89236d8..79f4a95 100644 --- a/Source/cmakewizard.cxx +++ b/Source/cmakewizard.cxx @@ -9,8 +9,8 @@ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ @@ -23,8 +23,9 @@ cmakewizard::cmakewizard() m_ShowAdvanced = false; } - -void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter) + +void cmakewizard::AskUser(const char* key, + cmCacheManager::CacheIterator& iter) { printf("Variable Name: %s\n", key); const char* helpstring = iter.GetProperty("HELPSTRING"); @@ -34,7 +35,7 @@ void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter) char buffer[4096]; buffer[0] = 0; fgets(buffer, sizeof(buffer)-1, stdin); - + if(strlen(buffer) > 0) { std::string sbuffer = buffer; @@ -44,7 +45,7 @@ void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter) { value = sbuffer.substr(0, pos+1); } - + if ( value.size() > 0 ) { if(iter.GetType() == cmCacheManager::PATH || @@ -67,7 +68,7 @@ void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter) bool cmakewizard::AskAdvanced() { - printf("Would you like to see advanced options? [No]:"); + printf("Would you like to see advanced options? [No]:"); char buffer[4096]; buffer[0] = 0; fgets(buffer, sizeof(buffer)-1, stdin); @@ -105,7 +106,8 @@ int cmakewizard::RunWizard(std::vector<std::string> const& args) { asked = false; // run cmake - this->ShowMessage("Please wait while cmake processes CMakeLists.txt files....\n"); + this->ShowMessage( + "Please wait while cmake processes CMakeLists.txt files....\n"); make.Configure(); this->ShowMessage("\n"); @@ -115,9 +117,9 @@ int cmakewizard::RunWizard(std::vector<std::string> const& args) cmCacheManager::CacheIterator i = cachem->NewIterator(); // iterate over all entries in the cache for(;!i.IsAtEnd(); i.Next()) - { + { std::string key = i.GetName(); - if( i.GetType() == cmCacheManager::INTERNAL || + if( i.GetType() == cmCacheManager::INTERNAL || i.GetType() == cmCacheManager::STATIC || i.GetType() == cmCacheManager::UNINITIALIZED ) { @@ -136,7 +138,7 @@ int cmakewizard::RunWizard(std::vector<std::string> const& args) } } else - { + { if(m_ShowAdvanced || !i.GetPropertyAsBool("ADVANCED")) { this->AskUser(key.c_str(), i); |