From 401922e04ba57d5672abf1cb112f79018e0e8f74 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 11 May 2006 16:05:58 -0400 Subject: ENH: merge changes from main tree --- Source/CTest/cmCTestBuildHandler.cxx | 2 +- Source/cmAddSubDirectoryCommand.cxx | 3 +- Source/cmExprParser.cxx | 6 +- Source/cmExprParserHelper.cxx | 14 +- Source/cmFLTKWrapUICommand.cxx | 7 +- Source/cmFileCommand.cxx | 4 +- Source/cmGlobalGenerator.cxx | 183 ++++++++++++++---------- Source/cmGlobalGenerator.h | 3 +- Source/cmGlobalKdevelopGenerator.cxx | 65 +++++---- Source/cmGlobalMSYSMakefileGenerator.cxx | 13 +- Source/cmGlobalMinGWMakefileGenerator.cxx | 7 +- Source/cmGlobalMinGWMakefileGenerator.h | 3 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 7 +- Source/cmGlobalNMakeMakefileGenerator.h | 3 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 74 ++++++---- Source/cmGlobalUnixMakefileGenerator3.h | 3 +- Source/cmGlobalVisualStudio6Generator.cxx | 35 +++-- Source/cmGlobalVisualStudio6Generator.h | 3 +- Source/cmGlobalVisualStudio71Generator.cxx | 54 ++++---- Source/cmGlobalVisualStudio71Generator.h | 3 +- Source/cmGlobalVisualStudio7Generator.cxx | 72 ++++++---- Source/cmGlobalVisualStudio7Generator.h | 6 +- Source/cmGlobalVisualStudio8Generator.cxx | 22 ++- Source/cmGlobalVisualStudio8Generator.h | 3 +- Source/cmGlobalVisualStudio8Win64Generator.cxx | 6 +- Source/cmGlobalVisualStudio8Win64Generator.h | 6 +- Source/cmGlobalWatcomWMakeGenerator.cxx | 7 +- Source/cmGlobalXCode21Generator.cxx | 3 +- Source/cmGlobalXCode21Generator.h | 3 +- Source/cmGlobalXCodeGenerator.cxx | 184 +++++++++++++++---------- Source/cmGlobalXCodeGenerator.h | 3 +- Source/cmIfCommand.cxx | 12 +- Source/cmIfCommand.h | 6 +- Source/cmIncludeCommand.cxx | 3 +- Source/cmIncludeDirectoryCommand.cxx | 6 +- Source/cmIncludeExternalMSProjectCommand.cxx | 6 +- Source/cmIncludeExternalMSProjectCommand.h | 6 +- Source/cmIncludeRegularExpressionCommand.cxx | 3 +- Source/cmIncludeRegularExpressionCommand.h | 3 +- Source/cmInstallCommand.h | 14 +- Source/cmInstallFilesCommand.cxx | 3 +- Source/cmInstallGenerator.cxx | 5 +- Source/cmInstallGenerator.h | 3 +- Source/cmInstallProgramsCommand.cxx | 6 +- Source/cmInstallTargetGenerator.cxx | 23 ++-- Source/cmInstallTargetGenerator.h | 3 +- Source/cmInstallTargetsCommand.cxx | 6 +- Source/cmListCommand.cxx | 2 +- Source/cmListCommand.h | 15 +- 49 files changed, 566 insertions(+), 366 deletions(-) diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 3e1dff9..7136ad5 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -903,7 +903,7 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data) { errorLine = 1; cmCTestLog(this->CTest, DEBUG, " Error Line: " << data - << " (matches: " << this->CustomWarningMatches[wrxCnt] << ")" + << " (matches: " << this->CustomErrorMatches[wrxCnt] << ")" << std::endl); break; } diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index e695781..5e13150 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -111,7 +111,8 @@ bool cmAddSubDirectoryCommand::InitialPass "directory as well."); return false; } - cmSystemTools::ReplaceString(binPath,this->Makefile->GetHomeDirectory(), + cmSystemTools::ReplaceString(binPath, + this->Makefile->GetHomeDirectory(), this->Makefile->GetHomeOutputDirectory()); } } diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index d1b2fa8..a389c7c 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -121,7 +121,8 @@ This file must be translated to C and modified to build everywhere. Run bison like this: - bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h + -ocmExprParser.cxx cmExprParser.y Modify cmExprParser.cxx: - remove TABs @@ -161,7 +162,8 @@ static void cmExprError(yyscan_t yyscanner, const char* message); #endif #ifdef _MSC_VER # pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +# pragma warning (disable: 4065) /* Switch statement contains default but + no case. */ #endif diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1b6852d..bf9d25f 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -72,7 +72,8 @@ int cmExprParserHelper::ParseString(const char* str, int verb) if ( Verbose ) { - std::cerr << "Expanding [" << str << "] produced: [" << this->Result << "]" << std::endl; + std::cerr << "Expanding [" << str << "] produced: [" + << this->Result << "]" << std::endl; } return 1; } @@ -109,19 +110,8 @@ int cmExprParserHelper::LexInput(char* buf, int maxlen) void cmExprParserHelper::Error(const char* str) { unsigned long pos = static_cast(this->InputBufferPos); - //fprintf(stderr, "Argument Parser Error: %s (%lu / Line: %d)\n", str, pos, this->CurrentLine); cmOStringStream ostr; ostr << str << " (" << pos << ")"; - /* - int cc; - std::cerr << "String: ["; - for ( cc = 0; cc < 30 && *(this->InputBuffer.c_str() + this->InputBufferPos + cc); - cc ++ ) - { - std::cerr << *(this->InputBuffer.c_str() + this->InputBufferPos + cc); - } - std::cerr << "]" << std::endl; - */ this->ErrorString = ostr.str(); } diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index c6097c4..2412d55 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -139,9 +139,10 @@ void cmFLTKWrapUICommand::FinalPass() std::string msg = "In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of " "source files that should be added to your executable or library. It " - "appears that you have not added these source files to your target. You " - "should change your CMakeLists.txt file to directly add the generated " - "files to the target. For example FTLK_WRAP_UI(foo src1 src2 src3) " + "appears that you have not added these source files to your target. " + "You should change your CMakeLists.txt file to " + "directly add the generated files to the target. " + "For example FTLK_WRAP_UI(foo src1 src2 src3) " "will create a variable named foo_FLTK_UI_SRCS that contains the list " "of sources to add to your target when you call ADD_LIBRARY or " "ADD_EXECUTABLE. For now CMake will add the sources to your target " diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 0eb8f45..27c5e58 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -970,8 +970,8 @@ bool cmFileCommand::HandleRelativePathCommand( if(!cmSystemTools::FileIsFullPath(fileName.c_str())) { std::string errstring = - "RelativePath must be passed a full path to the directory: " - + directoryName; + "RelativePath must be passed a full path to the file: " + + fileName; this->SetError(errstring.c_str()); return false; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0911f35..c3c54e7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -61,7 +61,8 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM") || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) { - std::string setMakeProgram = mf->GetModulesFile(this->FindMakeProgramFile.c_str()); + std::string setMakeProgram = + mf->GetModulesFile(this->FindMakeProgramFile.c_str()); if(setMakeProgram.size()) { mf->ReadListFile(0, setMakeProgram.c_str()); @@ -126,27 +127,39 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) // // First figure out what OS we are running on: // -// CMakeSystem.cmake // configured file created by CMakeDetermineSystem.cmake -// CMakeDetermineSystem.cmake // figure out os info and create CMakeSystem.cmake IFF CMAKE_SYSTEM_NAME not set -// CMakeSystem.cmake // configured file created by CMakeDetermineSystem.cmake IFF CMAKE_SYSTEM_LOADED -// TODO: CMakeDetermineSystem.cmake and CMakeSystem.cmake should be in the same if +// CMakeSystem.cmake - configured file created by CMakeDetermineSystem.cmake +// CMakeDetermineSystem.cmake - figure out os info and create +// CMakeSystem.cmake IFF CMAKE_SYSTEM_NAME +// not set +// CMakeSystem.cmake - configured file created by +// CMakeDetermineSystem.cmake IFF CMAKE_SYSTEM_LOADED // Next try and enable all languages found in the languages vector // // FOREACH LANG in languages -// CMake(LANG)Compiler.cmake // configured file create by CMakeDetermine(LANG)Compiler.cmake -// CMakeDetermine(LANG)Compiler.cmake // Finds compiler for LANG and creates CMake(LANG)Compiler.cmake -// CMake(LANG)Compiler.cmake // configured file create by CMakeDetermine(LANG)Compiler.cmake +// CMake(LANG)Compiler.cmake - configured file create by +// CMakeDetermine(LANG)Compiler.cmake +// CMakeDetermine(LANG)Compiler.cmake - Finds compiler for LANG and +// creates CMake(LANG)Compiler.cmake +// CMake(LANG)Compiler.cmake - configured file created by +// CMakeDetermine(LANG)Compiler.cmake // -// CMakeSystemSpecificInformation.cmake // inludes Platform/${CMAKE_SYSTEM_NAME}.cmake may use compiler stuff +// CMakeSystemSpecificInformation.cmake +// - includes Platform/${CMAKE_SYSTEM_NAME}.cmake +// may use compiler stuff // FOREACH LANG in languages -// CMake(LANG)Information.cmake // loads Platform/${CMAKE_SYSTEM_NAME}-${COMPILER}.cmake -// CMakeTest(LANG)Compiler.cmake // Make sure the compiler works with a try compile if CMakeDetermine(LANG) was loaded +// CMake(LANG)Information.cmake +// - loads Platform/${CMAKE_SYSTEM_NAME}-${COMPILER}.cmake +// CMakeTest(LANG)Compiler.cmake +// - Make sure the compiler works with a try compile if +// CMakeDetermine(LANG) was loaded // // Now load a few files that can override values set in any of the above -// CMake(PROJECTNAME)Compatibility.cmake // load any backwards compatibility stuff for current project -// ${CMAKE_USER_MAKE_RULES_OVERRIDE} // allow users a chance to override system variables +// CMake(PROJECTNAME)Compatibility.cmake +// - load any backwards compatibility stuff for current project +// ${CMAKE_USER_MAKE_RULES_OVERRIDE} +// - allow users a chance to override system variables // // @@ -210,7 +223,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, cmOStringStream windowsVersionString; windowsVersionString << osvi.dwMajorVersion << "." << osvi.dwMinorVersion; windowsVersionString.str(); - mf->AddDefinition("CMAKE_SYSTEM_VERSION", windowsVersionString.str().c_str()); + mf->AddDefinition("CMAKE_SYSTEM_VERSION", + windowsVersionString.str().c_str()); #endif // Read the DetermineSystem file std::string systemFile = mf->GetModulesFile("CMakeDetermineSystem.cmake"); @@ -258,11 +272,14 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, { if(!mf->ReadListFile(0,fpath.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", fpath.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); } - // if this file was found then the language was already determined to be working + // if this file was found then the language was already determined + // to be working needTestLanguage[lang] = false; - this->SetLanguageEnabled(lang, mf); // this can only be called after loading CMake(LANG)Compiler.cmake + this->SetLanguageEnabled(lang, mf); + // this can only be called after loading CMake(LANG)Compiler.cmake } } @@ -271,9 +288,9 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, if (this->CMakeInstance->GetIsInTryCompile()) { cmSystemTools::Error("This should not have happen. " - "If you see this message, you are probably using a " - "broken CMakeLists.txt file or a problematic release of " - "CMake"); + "If you see this message, you are probably " + "using a broken CMakeLists.txt file or a " + "problematic release of CMake"); } // if the CMake(LANG)Compiler.cmake file was not found then // load CMakeDetermine(LANG)Compiler.cmake @@ -293,8 +310,9 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, // So the global generator can specify that in this variable if(!mf->GetDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV")) { - // put ${CMake_(LANG)_COMPILER_ENV_VAR}=${CMAKE_(LANG)_COMPILER into the - // environment, in case user scripts want to run configure, or sub cmakes + // put ${CMake_(LANG)_COMPILER_ENV_VAR}=${CMAKE_(LANG)_COMPILER + // into the environment, in case user scripts want to run + // configure, or sub cmakes std::string compilerName = "CMAKE_"; compilerName += lang; compilerName += "_COMPILER"; @@ -302,7 +320,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, compilerEnv += lang; compilerEnv += "_COMPILER_ENV_VAR"; std::string envVar = mf->GetRequiredDefinition(compilerEnv.c_str()); - std::string envVarValue = mf->GetRequiredDefinition(compilerName.c_str()); + std::string envVarValue = + mf->GetRequiredDefinition(compilerName.c_str()); std::string env = envVar; env += "="; env += envVarValue; @@ -319,11 +338,14 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, fpath += "Compiler.cmake"; if(!mf->ReadListFile(0,fpath.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", fpath.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); } - this->SetLanguageEnabled(lang, mf); // this can only be called after loading CMake(LANG)Compiler.cmake - // the language must be enabled for try compile to work, but - // we do not know if it is a working compiler yet so set the test language flag + this->SetLanguageEnabled(lang, mf); + // this can only be called after loading CMake(LANG)Compiler.cmake + // the language must be enabled for try compile to work, but we do + // not know if it is a working compiler yet so set the test language + // flag needTestLanguage[lang] = true; } } // end loop over languages @@ -334,7 +356,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, fpath = mf->GetModulesFile("CMakeSystemSpecificInformation.cmake"); if(!mf->ReadListFile(0,fpath.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", fpath.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); } } // loop over languages again loading CMake(LANG)Information.cmake @@ -359,7 +382,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, fpath = mf->GetModulesFile(fpath.c_str()); if(!mf->ReadListFile(0,fpath.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", fpath.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); } } // Test the compiler for the language just setup @@ -382,8 +406,9 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, std::string compilerWorks = "CMAKE_"; compilerWorks += lang; compilerWorks += "_COMPILER_WORKS"; - // if the compiler did not work, then remove the CMake(LANG)Compiler.cmake file - // so that it will get tested the next time cmake is run + // if the compiler did not work, then remove the + // CMake(LANG)Compiler.cmake file so that it will get tested the + // next time cmake is run if(!mf->IsOn(compilerWorks.c_str())) { fpath = rootBin; @@ -405,12 +430,14 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, { if(strcmp(lang, "C") == 0) { - ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityC.cmake"); + ifpath = + mf->GetModulesFile("CMakeBackwardCompatibilityC.cmake"); mf->ReadListFile(0,ifpath.c_str()); } if(strcmp(lang, "CXX") == 0) { - ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityCXX.cmake"); + ifpath = + mf->GetModulesFile("CMakeBackwardCompatibilityCXX.cmake"); mf->ReadListFile(0,ifpath.c_str()); } } @@ -419,9 +446,9 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, } // end need test language } // end for each language - // Now load files that can override any settings on the platform or - // for the project - // First load the project compatibility file if it is in cmake + // Now load files that can override any settings on the platform or for + // the project First load the project compatibility file if it is in + // cmake std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT"); projectCompatibility += "/Modules/"; projectCompatibility += mf->GetDefinition("PROJECT_NAME"); @@ -432,7 +459,8 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, } } -const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* lang) +const char* cmGlobalGenerator +::GetLanguageOutputExtensionForLanguage(const char* lang) { if(!lang) { @@ -445,7 +473,8 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* return ""; } -const char* cmGlobalGenerator::GetLanguageOutputExtensionFromExtension(const char* ext) +const char* cmGlobalGenerator +::GetLanguageOutputExtensionFromExtension(const char* ext) { if(!ext) { @@ -468,9 +497,8 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionFromExtension(const cha const char* cmGlobalGenerator::GetLanguageFromExtension(const char* ext) { - // if there is an extension and it starts with . then - // move past the . because the extensions are not stored with a . - // in the map + // if there is an extension and it starts with . then move past the + // . because the extensions are not stored with a . in the map if(ext && *ext == '.') { ++ext; @@ -623,8 +651,8 @@ void cmGlobalGenerator::Configure() notFoundMap.insert(varName); } } - this->CMakeInstance->UpdateProgress("Configuring", - 0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size()); + this->CMakeInstance->UpdateProgress + ("Configuring", 0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size()); this->LocalGenerators[i]->GetMakefile()->CheckInfiniteLoops(); } } @@ -671,7 +699,8 @@ void cmGlobalGenerator::Generate() this->CreateDefaultGlobalTargets(&globalTargets); for (i = 0; i < this->LocalGenerators.size(); ++i) { - cmTargets* targets = &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); + cmTargets* targets = + &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); cmTargets::iterator tarIt; for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt ) { @@ -683,7 +712,8 @@ void cmGlobalGenerator::Generate() } for (i = 0; i < this->LocalGenerators.size(); ++i) { - cmTargets* targets = &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); + cmTargets* targets = + &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); cmTargets::iterator tit; for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit ) { @@ -714,8 +744,8 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, const char *target, std::string *output, cmMakefile *mf) { - std::string makeCommand = - this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM"); + std::string makeCommand = this->CMakeInstance-> + GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM"); if(makeCommand.size() == 0) { cmSystemTools::Error( @@ -745,15 +775,17 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, output,makeCommand.c_str(),config,false); } -std::string cmGlobalGenerator::GenerateBuildCommand(const char* makeProgram, - const char *projectName, const char* additionalOptions, const char *targetName, +std::string cmGlobalGenerator +::GenerateBuildCommand(const char* makeProgram, const char *projectName, + const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors) { // Project name and config are not used yet. (void)projectName; (void)config; - std::string makeCommand = cmSystemTools::ConvertToUnixOutputPath(makeProgram); + std::string makeCommand = + cmSystemTools::ConvertToUnixOutputPath(makeProgram); // Since we have full control over the invocation of nmake, let us // make it quiet. @@ -802,7 +834,8 @@ int cmGlobalGenerator::Build( // should we do a clean first? if (clean) { - std::string cleanCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, + std::string cleanCommand = + this->GenerateBuildCommand(makeCommandCSTR, projectName, 0, "clean", config, false); if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), output, &retVal, 0, false, timeout)) @@ -821,19 +854,21 @@ int cmGlobalGenerator::Build( } // now build - std::string makeCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, + std::string makeCommand = + this->GenerateBuildCommand(makeCommandCSTR, projectName, 0, target, config, false); if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output, &retVal, 0, false, timeout)) { cmSystemTools::SetRunCommandHideConsole(hideconsole); - cmSystemTools::Error("Generator: execution of make failed. Make command was: ", + cmSystemTools::Error + ("Generator: execution of make failed. Make command was: ", makeCommand.c_str()); if (output) { - *output += "\nGenerator: execution of make failed. Make command was: " + - makeCommand + "\n"; + *output += "\nGenerator: execution of make failed. Make command was: " + + makeCommand + "\n"; } // return to the original directory @@ -939,8 +974,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, void cmGlobalGenerator::GetEnabledLanguages(std::vector& lang) { - for(std::map::iterator i = this->LanguageEnabled.begin(); - i != this->LanguageEnabled.end(); ++i) + for(std::map::iterator i = + this->LanguageEnabled.begin(); i != this->LanguageEnabled.end(); ++i) { lang.push_back(i->first); } @@ -1014,7 +1049,8 @@ cmTarget* cmGlobalGenerator::FindTarget(const char* project, // if all projects/directories else { - std::map::iterator i = this->TotalTargets.find(name); + std::map::iterator i = + this->TotalTargets.find(name); if (i == this->TotalTargets.end()) { return 0; @@ -1045,8 +1081,8 @@ void cmGlobalGenerator::ConfigureRelativePaths() } //---------------------------------------------------------------------------- -std::string -cmGlobalGenerator::ConvertToRelativePath(const std::vector& local, +std::string cmGlobalGenerator +::ConvertToRelativePath(const std::vector& local, const char* in_remote) { // The path should never be quoted. @@ -1185,8 +1221,8 @@ inline std::string removeQuotes(const std::string& s) void cmGlobalGenerator::SetupTests() { - std::string ctest = - this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); + std::string ctest = this->LocalGenerators[0]->GetMakefile()-> + GetRequiredDefinition("CMAKE_COMMAND"); ctest = removeQuotes(ctest); ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); ctest += "/"; @@ -1194,8 +1230,8 @@ void cmGlobalGenerator::SetupTests() ctest += cmSystemTools::GetExecutableExtension(); if(!cmSystemTools::FileExists(ctest.c_str())) { - ctest = - this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); + ctest = this->LocalGenerators[0]->GetMakefile()-> + GetRequiredDefinition("CMAKE_COMMAND"); ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); ctest += "/Debug/"; ctest += "ctest"; @@ -1203,8 +1239,8 @@ void cmGlobalGenerator::SetupTests() } if(!cmSystemTools::FileExists(ctest.c_str())) { - ctest = - this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"); + ctest = this->LocalGenerators[0]->GetMakefile()-> + GetRequiredDefinition("CMAKE_COMMAND"); ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); ctest += "/Release/"; ctest += "ctest"; @@ -1231,7 +1267,8 @@ void cmGlobalGenerator::SetupTests() size_t i; for (i = 0; i < this->LocalGenerators.size(); ++i) { - total_tests += this->LocalGenerators[i]->GetMakefile()->GetTests()->size(); + total_tests += + this->LocalGenerators[i]->GetMakefile()->GetTests()->size(); } // If the file doesn't exist, then ENABLE_TESTING hasn't been run @@ -1299,7 +1336,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) const char* packageSourceTargetName = this->GetPackageSourceTargetName(); if ( packageSourceTargetName ) { - cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand()); @@ -1320,7 +1358,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) // Test if(mf->IsOn("CMAKE_TESTING_ENABLED")) { - cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); singleLine.push_back(this->GetCMakeInstance()->GetCTestCommand()); @@ -1335,7 +1374,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) const char* editCacheTargetName = this->GetEditCacheTargetName(); if ( editCacheTargetName ) { - cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); @@ -1360,7 +1400,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.push_back(singleLine); (*targets)[editCacheTargetName] = this->CreateGlobalTarget( - editCacheTargetName, "Running interactive CMake command-line interface...", + editCacheTargetName, + "Running interactive CMake command-line interface...", &cpackCommandLines, depends); } } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index e8f2634..1134c2a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -175,7 +175,8 @@ public: configuration. This is valid during generation only. */ cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; } - void AddTarget(cmTargets::value_type &v) { this->TotalTargets[v.first] = &v.second;}; + void AddTarget(cmTargets::value_type &v) { + this->TotalTargets[v.first] = &v.second;}; /** Support for multiple custom command outputs. */ virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose); diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index f40722c..244e031 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -7,7 +7,7 @@ Version: $Revision$ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved. + Copyright (c) 2004 Alexander Neundorf neundorf@kde.org, 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 @@ -40,16 +40,19 @@ cmLocalGenerator *cmGlobalKdevelopGenerator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalKdevelopGenerator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalKdevelopGenerator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates KDevelop 3 project files."; entry.full = - "Project files for KDevelop 3 will be created in the top directory and in every subdirectory " - "which features a CMakeLists.txt file containing a PROJECT() call. " + "Project files for KDevelop 3 will be created in the top directory " + "and in every subdirectory which features a CMakeLists.txt file " + "containing a PROJECT() call. " "If you change the settings using KDevelop cmake will try its best " "to keep your changes when regenerating the project files. " - "Additionally a hierarchy of UNIX makefiles is generated into the build tree. Any " + "Additionally a hierarchy of UNIX makefiles is generated into the " + "build tree. Any " "standard UNIX-style make program can build the project through the " "default make target. A \"make install\" target is also provided."; } @@ -211,7 +214,8 @@ bool cmGlobalKdevelopGenerator if (fileToOpen.empty()) { std::string ext = cmSystemTools::GetFilenameExtension(tmp); - if ((ext==".c") || (ext==".cc") || (ext==".cpp") || (ext==".C") || (ext==".h")) + if ((ext==".c") || (ext==".cc") || (ext==".cpp") + || (ext==".C") || (ext==".h")) { fileToOpen=tmp; } @@ -230,8 +234,8 @@ bool cmGlobalKdevelopGenerator /* create the project file, if it already exists, merge it with the existing one, otherwise create a new one */ -void -cmGlobalKdevelopGenerator::CreateProjectFile(const std::string& outputDir, +void cmGlobalKdevelopGenerator +::CreateProjectFile(const std::string& outputDir, const std::string& projectDir, const std::string& projectname, const std::string& executable, @@ -246,19 +250,20 @@ cmGlobalKdevelopGenerator::CreateProjectFile(const std::string& outputDir, if (cmSystemTools::FileExists(filename.c_str())) { this->MergeProjectFiles(outputDir, projectDir, filename, - executable, cmakeFilePattern, fileToOpen, sessionFilename); + executable, cmakeFilePattern, + fileToOpen, sessionFilename); } else { - this->CreateNewProjectFile(outputDir, projectDir, filename, - executable, cmakeFilePattern, fileToOpen, sessionFilename); + executable, cmakeFilePattern, + fileToOpen, sessionFilename); } } -void -cmGlobalKdevelopGenerator::MergeProjectFiles(const std::string& outputDir, +void cmGlobalKdevelopGenerator +::MergeProjectFiles(const std::string& outputDir, const std::string& projectDir, const std::string& filename, const std::string& executable, @@ -269,7 +274,9 @@ cmGlobalKdevelopGenerator::MergeProjectFiles(const std::string& outputDir, std::ifstream oldProjectFile(filename.c_str()); if (!oldProjectFile) { - this->CreateNewProjectFile(outputDir, projectDir, filename, executable, cmakeFilePattern, fileToOpen, sessionFilename); + this->CreateNewProjectFile(outputDir, projectDir, filename, + executable, cmakeFilePattern, + fileToOpen, sessionFilename); return; } @@ -307,12 +314,15 @@ cmGlobalKdevelopGenerator::MergeProjectFiles(const std::string& outputDir, // output the line from the file if it is not one of the above tags fout<<*it<<"\n"; - // if this is the tag output the stuff that goes in the general tag + // if this is the tag output the stuff that goes in the + // general tag if (strstr(line, "")) { - fout<<" KDevCustomProject\n"; - fout<<" "<\n"; //this one is important - fout<<" true\n"; //and this one + fout<< " KDevCustomProject\n"; + fout<< " " <\n"; //this one is important + fout<<" true\n"; + //and this one } // inside kdevcustomproject the must be put if (strstr(line, "")) @@ -329,8 +339,8 @@ cmGlobalKdevelopGenerator::MergeProjectFiles(const std::string& outputDir, } } -void -cmGlobalKdevelopGenerator::CreateNewProjectFile(const std::string& outputDir, +void cmGlobalKdevelopGenerator +::CreateNewProjectFile(const std::string& outputDir, const std::string& projectDir, const std::string& filename, const std::string& executable, @@ -353,14 +363,16 @@ cmGlobalKdevelopGenerator::CreateNewProjectFile(const std::string& outputDir, fout<<" KDevCustomProject\n"; fout<<" C++\n"; fout<<" \n"; - fout<<" "<\n"; //this one is important + fout<<" "<\n"; //this one is important fout<<" true\n"; //and this one fout<<" \n"; fout<<" C\n"; fout<<" \n"; fout<<" \n"; fout<<" \n"; - fout<<" "<\n"; + fout<<" "<\n"; fout<<" \n"; fout<<" "<\n"; fout<<" custom\n"; @@ -427,7 +439,8 @@ cmGlobalKdevelopGenerator::CreateNewProjectFile(const std::string& outputDir, fout<<" \n"; fout<<" \n"; fout<<" \n"; - fout<<" \n"; + fout<<" \n"; fout<<" \n"; fout<<" \n"; fout<<" \n"; @@ -443,7 +456,8 @@ cmGlobalKdevelopGenerator::CreateNewProjectFile(const std::string& outputDir, if (sessionFilename.empty()) return; - // and a session file, so that kdevelop opens a file if it opens the project the first time + // and a session file, so that kdevelop opens a file if it opens the + // project the first time cmGeneratedFileStream devses(sessionFilename.c_str()); if(!devses) { @@ -453,7 +467,8 @@ cmGlobalKdevelopGenerator::CreateNewProjectFile(const std::string& outputDir, devses<<"\n"; devses<<"\n"; devses<<" \n"; - devses<<" \n"; + devses<<" \n"; devses<<" \n"; devses<<" \n"; devses<<" \n"; diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 98862df..ca1a292 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -48,8 +48,8 @@ cmGlobalMSYSMakefileGenerator::FindMinGW(std::string const& makeloc) return mingwBin; } -void cmGlobalMSYSMakefileGenerator::EnableLanguage(std::vectorconst& l, - cmMakefile *mf) +void cmGlobalMSYSMakefileGenerator +::EnableLanguage(std::vectorconst& l, cmMakefile *mf) { this->FindMakeProgram(mf); std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); @@ -76,7 +76,8 @@ void cmGlobalMSYSMakefileGenerator::EnableLanguage(std::vectorconst this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf); if(!mf->IsSet("CMAKE_AR") && !this->CMakeInstance->GetIsInTryCompile()) { - cmSystemTools::Error("CMAKE_AR was not found, please set to archive program. ", + cmSystemTools::Error + ("CMAKE_AR was not found, please set to archive program. ", mf->GetDefinition("CMAKE_AR")); } } @@ -94,9 +95,11 @@ cmLocalGenerator *cmGlobalMSYSMakefileGenerator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalMSYSMakefileGenerator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalMSYSMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates MSYS makefiles."; - entry.full = "The makefiles use /bin/sh as the shell. They require msys to be installed on the machine."; + entry.full = "The makefiles use /bin/sh as the shell. " + "They require msys to be installed on the machine."; } diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 5ede978..7e9ad82 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -25,8 +25,8 @@ cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator() this->ToolSupportsColor = true; } -void cmGlobalMinGWMakefileGenerator::EnableLanguage(std::vectorconst& l, - cmMakefile *mf) +void cmGlobalMinGWMakefileGenerator +::EnableLanguage(std::vectorconst& l, cmMakefile *mf) { this->FindMakeProgram(mf); std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); @@ -64,7 +64,8 @@ cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalMinGWMakefileGenerator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalMinGWMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates a make file for use with mingw32-make."; diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 5067c1a..3459459 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -28,7 +28,8 @@ class cmGlobalMinGWMakefileGenerator : public cmGlobalUnixMakefileGenerator3 { public: cmGlobalMinGWMakefileGenerator(); - static cmGlobalGenerator* New() { return new cmGlobalMinGWMakefileGenerator; } + static cmGlobalGenerator* New() { + return new cmGlobalMinGWMakefileGenerator; } ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalMinGWMakefileGenerator::GetActualName();} diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 3784a80..bfb09db 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -25,8 +25,8 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() this->ToolSupportsColor = true; } -void cmGlobalNMakeMakefileGenerator::EnableLanguage(std::vectorconst& l, - cmMakefile *mf) +void cmGlobalNMakeMakefileGenerator +::EnableLanguage(std::vectorconst& l, cmMakefile *mf) { // pick a default mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); @@ -50,7 +50,8 @@ cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalNMakeMakefileGenerator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalNMakeMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates NMake makefiles."; diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index 575b587..511ee89 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -28,7 +28,8 @@ class cmGlobalNMakeMakefileGenerator : public cmGlobalUnixMakefileGenerator3 { public: cmGlobalNMakeMakefileGenerator(); - static cmGlobalGenerator* New() { return new cmGlobalNMakeMakefileGenerator; } + static cmGlobalGenerator* New() { + return new cmGlobalNMakeMakefileGenerator; } ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalNMakeMakefileGenerator::GetActualName();} diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index f1ee981..ca106c2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -48,7 +48,8 @@ void cmGlobalUnixMakefileGenerator3 if(!mf->GetDefinition(langComp.c_str())) { - cmSystemTools::Error(langComp.c_str(), " not set, after EnableLanguage"); + cmSystemTools::Error(langComp.c_str(), + " not set, after EnableLanguage"); continue; } const char* name = mf->GetRequiredDefinition(langComp.c_str()); @@ -88,7 +89,8 @@ cmLocalGenerator *cmGlobalUnixMakefileGenerator3::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalUnixMakefileGenerator3::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalUnixMakefileGenerator3 +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates standard UNIX makefiles."; @@ -182,7 +184,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() unsigned int i; for (i = 0; i < this->LocalGenerators.size(); ++i) { - lg = static_cast(this->LocalGenerators[i]); + lg = + static_cast(this->LocalGenerators[i]); // are any parents excluded bool exclude = false; cmLocalGenerator *lg3 = lg; @@ -238,7 +241,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() std::vector lfiles; for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) { - lg = static_cast(this->LocalGenerators[i]); + lg = + static_cast(this->LocalGenerators[i]); // Get the list of files contributing to this generation step. lfiles.insert(lfiles.end(),lg->GetMakefile()->GetListFiles().begin(), @@ -261,14 +265,15 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "SET(CMAKE_MAKEFILE_DEPENDS\n" - << " \"" << lg->Convert(cache.c_str(), + << " \"" + << lg->Convert(cache.c_str(), cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"; for(std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream - << " \"" << lg->Convert(i->c_str(), - cmLocalGenerator::START_OUTPUT).c_str() + << " \"" + << lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"; } cmakefileStream @@ -282,31 +287,38 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() cmakefileStream << "# The corresponding makefile is:\n" << "SET(CMAKE_MAKEFILE_OUTPUTS\n" - << " \"" << lg->Convert(makefileName.c_str(), + << " \"" + << lg->Convert(makefileName.c_str(), cmLocalGenerator::START_OUTPUT).c_str() << "\"\n" - << " \"" << lg->Convert(check.c_str(), + << " \"" + << lg->Convert(check.c_str(), cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"; // add in all the directory information files std::string tmpStr; for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) { - lg = static_cast(this->LocalGenerators[i]); + lg = + static_cast(this->LocalGenerators[i]); tmpStr = lg->GetMakefile()->GetStartOutputDirectory(); tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake"; cmakefileStream << " \"" << - lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n"; - const std::vector& outfiles = lg->GetMakefile()->GetOutputFiles(); + lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() + << "\"\n"; + const std::vector& outfiles = + lg->GetMakefile()->GetOutputFiles(); for(std::vector::const_iterator k= outfiles.begin(); k != outfiles.end(); ++k) { cmakefileStream << " \"" << - lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n"; + lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() + << "\"\n"; } } cmakefileStream << " )\n\n"; - this->WriteMainCMakefileLanguageRules(cmakefileStream, this->LocalGenerators); + this->WriteMainCMakefileLanguageRules(cmakefileStream, + this->LocalGenerators); if(!this->MultipleOutputPairs.empty()) { @@ -367,7 +379,8 @@ void cmGlobalUnixMakefileGenerator3::CheckMultipleOutputs(cmMakefile* mf, void cmGlobalUnixMakefileGenerator3 ::WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, - std::vector &lGenerators) + std::vector &lGenerators + ) { cmLocalUnixMakefileGenerator3 *lg; @@ -440,8 +453,8 @@ cmGlobalUnixMakefileGenerator3 // The directory-level rule should depend on the directory-level // rules of the subdirectories. - for(std::vector::iterator sdi = lg->GetChildren().begin(); - sdi != lg->GetChildren().end(); ++sdi) + for(std::vector::iterator sdi = + lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi) { cmLocalUnixMakefileGenerator3* slg = static_cast(*sdi); @@ -502,15 +515,17 @@ cmGlobalUnixMakefileGenerator3 } -std::string cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(const char* makeProgram, - const char *projectName, const char* additionalOptions, const char *targetName, +std::string cmGlobalUnixMakefileGenerator3 +::GenerateBuildCommand(const char* makeProgram, const char *projectName, + const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors) { // Project name and config are not used yet. (void)projectName; (void)config; - std::string makeCommand = cmSystemTools::ConvertToUnixOutputPath(makeProgram); + std::string makeCommand = + cmSystemTools::ConvertToUnixOutputPath(makeProgram); // Since we have full control over the invocation of nmake, let us // make it quiet. @@ -532,11 +547,13 @@ std::string cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(const char* mak cmLocalUnixMakefileGenerator3 *lg; if (this->LocalGenerators.size()) { - lg = static_cast(this->LocalGenerators[0]); + lg = static_cast + (this->LocalGenerators[0]); } else { - lg = static_cast(this->CreateLocalGenerator()); + lg = static_cast + (this->CreateLocalGenerator()); // set the Start directories lg->GetMakefile()->SetStartDirectory (this->CMakeInstance->GetStartDirectory()); @@ -578,7 +595,8 @@ cmGlobalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3 *lg; for (i = 0; i < this->LocalGenerators.size(); ++i) { - lg = static_cast(this->LocalGenerators[i]); + lg = static_cast + (this->LocalGenerators[i]); // for each target Generate the rule files for each target. cmTargets& targets = lg->GetMakefile()->GetTargets(); for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) @@ -756,7 +774,8 @@ cmGlobalUnixMakefileGenerator3 commands.push_back(lg->GetRecursiveMakeCall (makefileName.c_str(), localName.c_str())); this->AppendGlobalTargetDepends(depends,t->second); - lg->WriteMakeRule(ruleFileStream, "Pre-install relink rule for target.", + lg->WriteMakeRule(ruleFileStream, + "Pre-install relink rule for target.", localName.c_str(), depends, commands, true); depends.clear(); depends.push_back(localName); @@ -894,8 +913,8 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule std::string path; std::vector no_depends; std::vector commands; - lg->AppendEcho(commands, - "The following are some of the valid targets for this Makefile:"); + lg->AppendEcho(commands,"The following are some of the valid targets " + "for this Makefile:"); lg->AppendEcho(commands,"... all (the default if no target is provided)"); lg->AppendEcho(commands,"... clean"); lg->AppendEcho(commands,"... depend"); @@ -908,7 +927,8 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule cmLocalUnixMakefileGenerator3 *lg2; for (i = 0; i < this->LocalGenerators.size(); ++i) { - lg2 = static_cast(this->LocalGenerators[i]); + lg2 = + static_cast(this->LocalGenerators[i]); // for the passed in makefile or if this is the top Makefile wripte out // the targets if (lg2 == lg || !lg->GetParent()) diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 72b6761..1b7733d 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -58,7 +58,8 @@ class cmGlobalUnixMakefileGenerator3 : public cmGlobalGenerator { public: cmGlobalUnixMakefileGenerator3(); - static cmGlobalGenerator* New() { return new cmGlobalUnixMakefileGenerator3; } + static cmGlobalGenerator* New() { + return new cmGlobalUnixMakefileGenerator3; } ///! Get the name for the generator. virtual const char* GetName() const { diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 164727a..f076efb 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -24,8 +24,8 @@ cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator() this->FindMakeProgramFile = "CMakeVS6FindMake.cmake"; } -void cmGlobalVisualStudio6Generator::EnableLanguage(std::vectorconst& lang, - cmMakefile *mf) +void cmGlobalVisualStudio6Generator +::EnableLanguage(std::vectorconst& lang, cmMakefile *mf) { mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); @@ -67,16 +67,21 @@ void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf) } } -std::string cmGlobalVisualStudio6Generator::GenerateBuildCommand(const char* makeProgram, - const char *projectName, const char* additionalOptions, const char *targetName, - const char* config, bool ignoreErrors) +std::string cmGlobalVisualStudio6Generator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors) { // Ingoring errors is not implemented in visual studio 6 (void) ignoreErrors; // now build the test std::vector mp; - mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); + mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio" + "\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); cmSystemTools::ExpandRegistryValues(mp[0]); std::string originalCommand = makeProgram; std::string makeCommand = @@ -166,8 +171,9 @@ void cmGlobalVisualStudio6Generator::Generate() // add the ALL_BUILD to the first local generator of each project if(gen.size()) { - gen[0]->GetMakefile()-> - AddUtilityCommand("ALL_BUILD", false, no_output, no_depends, no_working_dir, + gen[0]->GetMakefile()->AddUtilityCommand("ALL_BUILD", false, + no_output, no_depends, + no_working_dir, "echo", "Build all projects"); } } @@ -183,8 +189,8 @@ void cmGlobalVisualStudio6Generator::Generate() } // Write a DSW file to the stream -void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout, - cmLocalGenerator* root, +void cmGlobalVisualStudio6Generator +::WriteDSWFile(std::ostream& fout,cmLocalGenerator* root, std::vector& generators) { // Write out the header for a DSW file @@ -267,7 +273,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout, const cmCustomCommandLines& cmds = cc.GetCommandLines(); std::string project = cmds[0][0]; std::string location = cmds[0][1]; - this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); + this->WriteExternalProject(fout, project.c_str(), + location.c_str(), cc.GetDepends()); } else { @@ -356,7 +363,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout, this->WriteDSWFooter(fout); } -void cmGlobalVisualStudio6Generator::OutputDSWFile(cmLocalGenerator* root, +void cmGlobalVisualStudio6Generator +::OutputDSWFile(cmLocalGenerator* root, std::vector& generators) { if(generators.size() == 0) @@ -501,7 +509,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio6Generator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalVisualStudio6Generator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Visual Studio 6 project files."; diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index fa76d68..07456a2 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -30,7 +30,8 @@ class cmGlobalVisualStudio6Generator : public cmGlobalGenerator { public: cmGlobalVisualStudio6Generator(); - static cmGlobalGenerator* New() { return new cmGlobalVisualStudio6Generator; } + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio6Generator; } ///! Get the name for the generator. virtual const char* GetName() const { diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index f37ecf2..62df78c 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -45,7 +45,8 @@ void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf) } // Write a SLN file to the stream -void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, +void cmGlobalVisualStudio71Generator +::WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators) { @@ -131,7 +132,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, const cmCustomCommandLines& cmds = cc.GetCommandLines(); std::string project = cmds[0][0]; std::string location = cmds[0][1]; - this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); + this->WriteExternalProject(fout, project.c_str(), + location.c_str(), cc.GetDepends()); } else { @@ -251,12 +253,14 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; const cmCustomCommandLines& cmds = cc.GetCommandLines(); std::string project = cmds[0][0]; - this->WriteProjectConfigurations(fout, project.c_str(), l->second.IsInAll()); + this->WriteProjectConfigurations(fout, project.c_str(), + l->second.IsInAll()); } else if ((l->second.GetType() != cmTarget::INSTALL_FILES) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) { - this->WriteProjectConfigurations(fout, si->c_str(), l->second.IsInAll()); + this->WriteProjectConfigurations(fout, si->c_str(), + l->second.IsInAll()); ++si; } } @@ -344,12 +348,12 @@ cmGlobalVisualStudio71Generator std::string name = i->c_str(); if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) { - // kind of weird removing the first 27 letters. - // my recommendatsions: - // use cmCustomCommand::GetCommand() to get the project name - // or get rid of the target name starting with "INCLUDE_EXTERNAL_MSPROJECT_" and use another - // indicator/flag somewhere. These external project names shouldn't conflict with cmake - // target names anyways. + // kind of weird removing the first 27 letters. my + // recommendatsions: use cmCustomCommand::GetCommand() to get the + // project name or get rid of the target name starting with + // "INCLUDE_EXTERNAL_MSPROJECT_" and use another indicator/flag + // somewhere. These external project names shouldn't conflict + // with cmake target names anyways. name.erase(name.begin(), name.begin() + 27); } std::string guid = this->GetGUID(name.c_str()); @@ -367,10 +371,10 @@ cmGlobalVisualStudio71Generator } } -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout, +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio71Generator +::WriteExternalProject(std::ostream& fout, const char* name, const char* location, const std::vector& depends) @@ -382,8 +386,8 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout, << this->GetGUID(name) << "}\"\n"; - // write out the dependencies here - // VS 7.1 includes dependencies with the project instead of in the global section + // write out the dependencies here VS 7.1 includes dependencies with the + // project instead of in the global section if(!depends.empty()) { fout << "\tProjectSection(ProjectDependencies) = postProject\n"; @@ -408,11 +412,10 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(std::ostream& fout, } -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void -cmGlobalVisualStudio71Generator::WriteProjectConfigurations(std::ostream& fout, +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio71Generator +::WriteProjectConfigurations(std::ostream& fout, const char* name, bool in_all_build) { @@ -420,10 +423,12 @@ cmGlobalVisualStudio71Generator::WriteProjectConfigurations(std::ostream& fout, for(std::vector::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n"; + fout << "\t\t{" << guid << "}." << *i + << ".ActiveCfg = " << *i << "|Win32\n"; if (in_all_build) { - fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|Win32\n"; + fout << "\t\t{" << guid << "}." << *i + << ".Build.0 = " << *i << "|Win32\n"; } } } @@ -449,7 +454,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio71Generator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalVisualStudio71Generator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Visual Studio .NET 2003 project files."; diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index dc51fe0..6ccf06a 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -53,7 +53,8 @@ protected: const char* name, const char* path, cmTarget &t); virtual void WriteProjectDepends(std::ostream& fout, const char* name, const char* path, cmTarget &t); - virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, + virtual void WriteProjectConfigurations(std::ostream& fout, + const char* name, bool in_all); virtual void WriteExternalProject(std::ostream& fout, const char* name, const char* path, diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 970e7ef..791daea 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -28,7 +28,8 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator() } -void cmGlobalVisualStudio7Generator::EnableLanguage(std::vectorconst & lang, +void cmGlobalVisualStudio7Generator +::EnableLanguage(std::vectorconst & lang, cmMakefile *mf) { mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); @@ -53,8 +54,9 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(std::vectorcons const char* extraPath = cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH"); if(extraPath) { - mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", - extraPath, "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", + mf->AddCacheDefinition + ("CMAKE_MSVCIDE_RUN_PATH", extraPath, + "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", cmCacheManager::STATIC); } @@ -65,8 +67,10 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) mf->AddDefinition("MSVC70", "1"); } -std::string cmGlobalVisualStudio7Generator::GenerateBuildCommand(const char* makeProgram, - const char *projectName, const char* additionalOptions, const char *targetName, +std::string cmGlobalVisualStudio7Generator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors) { // Ingoring errors is not implemented in visual studio 6 @@ -169,7 +173,8 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) { // only add unique configurations if(std::find(this->Configurations.begin(), - this->Configurations.end(), config) == this->Configurations.end()) + this->Configurations.end(), + config) == this->Configurations.end()) { this->Configurations.push_back(config); } @@ -241,7 +246,8 @@ void cmGlobalVisualStudio7Generator::Generate() this->OutputSLNFile(); } -void cmGlobalVisualStudio7Generator::OutputSLNFile(cmLocalGenerator* root, +void cmGlobalVisualStudio7Generator +::OutputSLNFile(cmLocalGenerator* root, std::vector& generators) { if(generators.size() == 0) @@ -274,7 +280,8 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile() // Write a SLN file to the stream -void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, +void cmGlobalVisualStudio7Generator +::WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators) { @@ -359,7 +366,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, const cmCustomCommandLines& cmds = cc.GetCommandLines(); std::string project = cmds[0][0]; std::string location = cmds[0][1]; - this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends()); + this->WriteExternalProject(fout, project.c_str(), + location.c_str(), cc.GetDepends()); } else { @@ -492,8 +500,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, cmSystemTools::Error(m.c_str()); } - fout << "\t\t{" << this->GetGUID(name.c_str()) << "}." << depcount << " = {" - << guid.c_str() << "}\n"; + fout << "\t\t{" << this->GetGUID(name.c_str()) + << "}." << depcount << " = {" << guid.c_str() << "}\n"; depcount++; } } @@ -529,12 +537,14 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; const cmCustomCommandLines& cmds = cc.GetCommandLines(); std::string name = cmds[0][0]; - this->WriteProjectConfigurations(fout, name.c_str(), l->second.IsInAll()); + this->WriteProjectConfigurations(fout, name.c_str(), + l->second.IsInAll()); } else if ((l->second.GetType() != cmTarget::INSTALL_FILES) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) { - this->WriteProjectConfigurations(fout, si->c_str(), l->second.IsInAll()); + this->WriteProjectConfigurations(fout, si->c_str(), + l->second.IsInAll()); ++si; } } @@ -613,12 +623,12 @@ cmGlobalVisualStudio7Generator std::string name = *i; if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) { - // kind of weird removing the first 27 letters. - // my recommendatsions: - // use cmCustomCommand::GetCommand() to get the project name - // or get rid of the target name starting with "INCLUDE_EXTERNAL_MSPROJECT_" and use another - // indicator/flag somewhere. These external project names shouldn't conflict with cmake - // target names anyways. + // kind of weird removing the first 27 letters. my + // recommendatsions: use cmCustomCommand::GetCommand() to get the + // project name or get rid of the target name starting with + // "INCLUDE_EXTERNAL_MSPROJECT_" and use another indicator/flag + // somewhere. These external project names shouldn't conflict + // with cmake target names anyways. name.erase(name.begin(), name.begin() + 27); } std::string guid = this->GetGUID(name.c_str()); @@ -639,11 +649,10 @@ cmGlobalVisualStudio7Generator } -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void -cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout, +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio7Generator +::WriteProjectConfigurations(std::ostream& fout, const char* name, bool in_all_build) { @@ -651,10 +660,12 @@ cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout, for(std::vector::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n"; + fout << "\t\t{" << guid << "}." << *i + << ".ActiveCfg = " << *i << "|Win32\n"; if (in_all_build) { - fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|Win32\n"; + fout << "\t\t{" << guid << "}." << *i + << ".Build.0 = " << *i << "|Win32\n"; } } } @@ -701,7 +712,8 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name) { std::string guidStoreName = name; guidStoreName += "_GUID_CMAKE"; - const char* storedGUID = this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); + const char* storedGUID = + this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); if(storedGUID) { return std::string(storedGUID); @@ -728,7 +740,8 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name) ret = reinterpret_cast(uidstr); RpcStringFree(&uidstr); ret = cmSystemTools::UpperCase(ret); - this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), ret.c_str(), "Stored GUID", + this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), + ret.c_str(), "Stored GUID", cmCacheManager::INTERNAL); } @@ -738,7 +751,8 @@ std::vector *cmGlobalVisualStudio7Generator::GetConfigurations() }; //---------------------------------------------------------------------------- -void cmGlobalVisualStudio7Generator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalVisualStudio7Generator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Visual Studio .NET 2002 project files."; diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 1344c8a..5b14449 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -30,7 +30,8 @@ class cmGlobalVisualStudio7Generator : public cmGlobalGenerator { public: cmGlobalVisualStudio7Generator(); - static cmGlobalGenerator* New() { return new cmGlobalVisualStudio7Generator; } + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio7Generator; } ///! Get the name for the generator. virtual const char* GetName() const { @@ -103,7 +104,8 @@ protected: const char* name, const char* path, cmTarget &t); virtual void WriteProjectDepends(std::ostream& fout, const char* name, const char* path, cmTarget &t); - virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, + virtual void WriteProjectConfigurations(std::ostream& fout, + const char* name, bool in_all); virtual void WriteSLNFooter(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout); diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index f92d7bb..33f4553 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -49,7 +49,8 @@ void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio8Generator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalVisualStudio8Generator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Visual Studio .NET 2005 project files."; @@ -96,7 +97,8 @@ void cmGlobalVisualStudio8Generator::Generate() cmTarget* tgt = mf->FindTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET); if(!tgt) { - cmSystemTools::Error("Error adding target " CMAKE_CHECK_BUILD_SYSTEM_TARGET); + cmSystemTools::Error("Error adding target " + CMAKE_CHECK_BUILD_SYSTEM_TARGET); continue; } @@ -115,7 +117,8 @@ void cmGlobalVisualStudio8Generator::Generate() lmf->GetListFiles().end()); } // Sort the list of input files and remove duplicates. - std::sort(listFiles.begin(), listFiles.end(), std::less()); + std::sort(listFiles.begin(), listFiles.end(), + std::less()); std::vector::iterator new_end = std::unique(listFiles.begin(), listFiles.end()); listFiles.erase(new_end, listFiles.end()); @@ -147,13 +150,16 @@ void cmGlobalVisualStudio8Generator::Generate() CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake", listFiles, no_main_dependency, commandLines, "Checking Build System", no_working_directory, true); - if(cmSourceFile* file = mf->GetSource(CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake.rule")) + if(cmSourceFile* file = mf->GetSource(CMAKE_CHECK_BUILD_SYSTEM_TARGET + ".vcproj.cmake.rule")) { tgt->GetSourceFiles().push_back(file); } else { - cmSystemTools::Error("Error adding rule for " CMAKE_CHECK_BUILD_SYSTEM_TARGET ".vcproj.cmake"); + cmSystemTools::Error("Error adding rule for " + CMAKE_CHECK_BUILD_SYSTEM_TARGET + ".vcproj.cmake"); } } } @@ -229,11 +235,13 @@ cmGlobalVisualStudio8Generator for(std::vector::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".ActiveCfg = " + fout << "\t\t{" << guid << "}." << *i + << "|" << this->PlatformName << ".ActiveCfg = " << *i << "|" << this->PlatformName << "\n"; if (in_all_build) { - fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".Build.0 = " + fout << "\t\t{" << guid << "}." << *i + << "|" << this->PlatformName << ".Build.0 = " << *i << "|" << this->PlatformName << "\n"; } } diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 8fd1937..b7cf038 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -29,7 +29,8 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator { public: cmGlobalVisualStudio8Generator(); - static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Generator; } + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio8Generator; } ///! Get the name for the generator. virtual const char* GetName() const { diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx index 5408a0c..11c1c8f 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -38,14 +38,16 @@ cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio8Win64Generator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalVisualStudio8Win64Generator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Visual Studio .NET 2005 Win64 project files."; entry.full = ""; } -void cmGlobalVisualStudio8Win64Generator::EnableLanguage(std::vectorconst & lang, +void cmGlobalVisualStudio8Win64Generator +::EnableLanguage(std::vectorconst & lang, cmMakefile *mf) { mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h index dda7f18..e489785 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.h +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -25,11 +25,13 @@ * * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree */ -class cmGlobalVisualStudio8Win64Generator : public cmGlobalVisualStudio8Generator +class cmGlobalVisualStudio8Win64Generator : + public cmGlobalVisualStudio8Generator { public: cmGlobalVisualStudio8Win64Generator(); - static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Win64Generator; } + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio8Win64Generator; } ///! Get the name for the generator. virtual const char* GetName() const { diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 3e19c9e..8fd4b30 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -26,8 +26,8 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() this->EmptyCommandsHack = "@cd ."; } -void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vectorconst& l, - cmMakefile *mf) +void cmGlobalWatcomWMakeGenerator +::EnableLanguage(std::vectorconst& l, cmMakefile *mf) { // pick a default mf->AddDefinition("WATCOM", "1"); @@ -60,7 +60,8 @@ cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalWatcomWMakeGenerator::GetDocumentation(cmDocumentationEntry& entry) const +void cmGlobalWatcomWMakeGenerator +::GetDocumentation(cmDocumentationEntry& entry) const { entry.name = this->GetName(); entry.brief = "Generates Watcom WMake makefiles."; diff --git a/Source/cmGlobalXCode21Generator.cxx b/Source/cmGlobalXCode21Generator.cxx index f482b26..88eecbd 100644 --- a/Source/cmGlobalXCode21Generator.cxx +++ b/Source/cmGlobalXCode21Generator.cxx @@ -40,6 +40,7 @@ cmGlobalXCode21Generator::WriteXCodePBXProj(std::ostream& fout, fout << "objectVersion = 42;\n"; cmXCode21Object::PrintList(this->XCodeObjects, fout); cmXCode21Object::Indent(1, fout); - fout << "rootObject = " << this->RootObject->GetId() << " /* Project object */;\n"; + fout << "rootObject = " << this->RootObject->GetId() + << " /* Project object */;\n"; fout << "}\n"; } diff --git a/Source/cmGlobalXCode21Generator.h b/Source/cmGlobalXCode21Generator.h index d585e0e..3a1b00e 100644 --- a/Source/cmGlobalXCode21Generator.h +++ b/Source/cmGlobalXCode21Generator.h @@ -34,7 +34,8 @@ public: std::vector& generators); ///! What is the configurations directory variable called? - virtual const char* GetCMakeCFGInitDirectory() { return "$(CONFIGURATION)"; } + virtual const char* GetCMakeCFGInitDirectory() { + return "$(CONFIGURATION)"; } }; #endif diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d86bf2d..fea2193 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -79,7 +79,8 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New() { #if defined(CMAKE_BUILD_WITH_CMAKE) cmXcodeVersionParser parser; - parser.ParseFile("/Developer/Applications/Xcode.app/Contents/version.plist"); + parser.ParseFile + ("/Developer/Applications/Xcode.app/Contents/version.plist"); if(parser.Version == 15) { return new cmGlobalXCodeGenerator; @@ -94,8 +95,8 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New() ret->SetVersion(parser.Version); return ret; #else - std::cerr - << "CMake should be built with cmake to use XCode, default to Xcode 1.5\n"; + std::cerr << "CMake should be built with cmake to use XCode, " + "default to Xcode 1.5\n"; return new cmGlobalXCodeGenerator; #endif } @@ -126,9 +127,13 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vectorconst& } //---------------------------------------------------------------------------- -std::string cmGlobalXCodeGenerator::GenerateBuildCommand(const char* makeProgram, - const char *projectName, const char* additionalOptions, const char *targetName, - const char* config, bool ignoreErrors) +std::string cmGlobalXCodeGenerator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors) { // Config is not used yet (void) ignoreErrors; @@ -202,7 +207,8 @@ void cmGlobalXCodeGenerator::ConfigureOutputPaths() this->CurrentMakefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH"); if(this->LibraryOutputPath.size() == 0) { - this->LibraryOutputPath = this->CurrentMakefile->GetCurrentOutputDirectory(); + this->LibraryOutputPath = + this->CurrentMakefile->GetCurrentOutputDirectory(); } // make sure there is a trailing slash if(this->LibraryOutputPath.size() && @@ -220,7 +226,8 @@ void cmGlobalXCodeGenerator::ConfigureOutputPaths() this->CurrentMakefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); if(this->ExecutableOutputPath.size() == 0) { - this->ExecutableOutputPath = this->CurrentMakefile->GetCurrentOutputDirectory(); + this->ExecutableOutputPath = + this->CurrentMakefile->GetCurrentOutputDirectory(); } // make sure there is a trailing slash if(this->ExecutableOutputPath.size() && @@ -255,7 +262,8 @@ void cmGlobalXCodeGenerator::Generate() this->CurrentProject = root->GetMakefile()->GetProjectName(); this->SetCurrentLocalGenerator(root); this->OutputDir = this->CurrentMakefile->GetHomeOutputDirectory(); - this->OutputDir = cmSystemTools::CollapseFullPath(this->OutputDir.c_str()); + this->OutputDir = + cmSystemTools::CollapseFullPath(this->OutputDir.c_str()); cmSystemTools::SplitPath(this->OutputDir.c_str(), this->ProjectOutputDirectoryComponents); this->CurrentLocalGenerator = root; @@ -353,7 +361,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root) this->CurrentReRunCMakeMakefile += "/CMakeScripts"; cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str()); this->CurrentReRunCMakeMakefile += "/ReRunCMake.make"; - cmGeneratedFileStream makefileStream(this->CurrentReRunCMakeMakefile.c_str()); + cmGeneratedFileStream makefileStream + (this->CurrentReRunCMakeMakefile.c_str()); makefileStream.SetCopyIfDifferent(true); makefileStream << "# Generated by CMake, DO NOT EDIT\n"; makefileStream << "CMakeFiles/cmake.check_cache: "; @@ -420,7 +429,8 @@ cmGlobalXCodeGenerator::CreateString(const char* s) } //---------------------------------------------------------------------------- -cmXCodeObject* cmGlobalXCodeGenerator::CreateObjectReference(cmXCodeObject* ref) +cmXCodeObject* cmGlobalXCodeGenerator +::CreateObjectReference(cmXCodeObject* ref) { cmXCodeObject* obj = this->CreateObject(cmXCodeObject::OBJECT_REF); obj->SetObject(ref); @@ -440,7 +450,8 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg, lg->AppendFlags(flags, cmtarget.GetProperty("COMPILE_FLAGS")); } lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS")); - cmXCodeObject* fileRef = this->CreateObject(cmXCodeObject::PBXFileReference); + cmXCodeObject* fileRef = + this->CreateObject(cmXCodeObject::PBXFileReference); cmXCodeObject* group = this->GroupMap[sf]; cmXCodeObject* children = group->GetObject("children"); @@ -456,7 +467,8 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg, buildFile->SetComment(comment.c_str()); fileRef->SetComment(fname.c_str()); buildFile->AddAttribute("fileRef", this->CreateObjectReference(fileRef)); - cmXCodeObject* settings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + cmXCodeObject* settings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); settings->AddAttribute("COMPILER_FLAGS", this->CreateString(flags.c_str())); buildFile->AddAttribute("settings", settings); fileRef->AddAttribute("fileEncoding", this->CreateString("4")); @@ -546,7 +558,8 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) std::string outdir = cmSystemTools::CollapseFullPath(this->CurrentMakefile-> GetCurrentOutputDirectory()); - cmSystemTools::SplitPath(outdir.c_str(), this->CurrentOutputDirectoryComponents); + cmSystemTools::SplitPath(outdir.c_str(), + this->CurrentOutputDirectoryComponents); // Select the current set of configuration types. this->CurrentConfigurationTypes.clear(); @@ -555,7 +568,8 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) if(const char* types = this->CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) { - cmSystemTools::ExpandListArgument(types, this->CurrentConfigurationTypes); + cmSystemTools::ExpandListArgument(types, + this->CurrentConfigurationTypes); } } if(this->CurrentConfigurationTypes.empty()) @@ -608,7 +622,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, sourceBuildPhase->AddAttribute("buildActionMask", this->CreateString("2147483647")); sourceBuildPhase->SetComment("Sources"); - cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + cmXCodeObject* buildFiles = + this->CreateObject(cmXCodeObject::OBJECT_LIST); sourceBuildPhase->AddAttribute("files", buildFiles); sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", this->CreateString("0")); @@ -621,7 +636,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, i != classes.end(); ++i) { cmXCodeObject* xsf = - this->CreateXCodeSourceFile(this->CurrentLocalGenerator, *i, cmtarget); + this->CreateXCodeSourceFile(this->CurrentLocalGenerator, + *i, cmtarget); cmXCodeObject* fr = xsf->GetObject("fileRef"); cmXCodeObject* filetype = fr->GetObject()->GetObject("lastKnownFileType"); @@ -725,7 +741,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, for ( sfIt = mit->second.begin(); sfIt != mit->second.end(); ++ sfIt ) { cmXCodeObject* xsf = - this->CreateXCodeSourceFile(this->CurrentLocalGenerator, *sfIt, cmtarget); + this->CreateXCodeSourceFile(this->CurrentLocalGenerator, + *sfIt, cmtarget); buildFiles->AddObject(xsf); } } @@ -789,8 +806,8 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, } } std::vector reruncom; - cmXCodeObject* cmakeReRunPhase = this->CreateBuildPhase("CMake ReRun", - "cmakeReRunPhase", + cmXCodeObject* cmakeReRunPhase = + this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase", cmtarget, reruncom); buildPhases->AddObject(cmakeReRunPhase); // create prebuild phase @@ -799,17 +816,16 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, "cmakeRulesBuildPhase", cmtarget, commands); // create prebuild phase - cmXCodeObject* preBuildPhase = this->CreateBuildPhase("CMake PreBuild Rules", - "preBuildCommands", + cmXCodeObject* preBuildPhase = + this->CreateBuildPhase("CMake PreBuild Rules", "preBuildCommands", cmtarget, prebuild); // create prebuild phase - cmXCodeObject* preLinkPhase = this->CreateBuildPhase("CMake PreLink Rules", - "preLinkCommands", + cmXCodeObject* preLinkPhase = + this->CreateBuildPhase("CMake PreLink Rules", "preLinkCommands", cmtarget, prelink); // create prebuild phase cmXCodeObject* postBuildPhase = - this->CreateBuildPhase("CMake PostBuild Rules", - "postBuildPhase", + this->CreateBuildPhase("CMake PostBuild Rules", "postBuildPhase", cmtarget, postbuild); // the order here is the order they will be built in if(preBuildPhase) @@ -972,7 +988,8 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, // There are no outputs. Use the generated force rule name. makefileStream << tname[&cc] << ": "; } - for(std::vector::const_iterator d = cc.GetDepends().begin(); + for(std::vector::const_iterator d = + cc.GetDepends().begin(); d != cc.GetDepends().end(); ++d) { if(!this->FindTarget(this->CurrentProject.c_str(), @@ -1052,7 +1069,8 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, } makecmd += " all"; cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ "); - buildphase->AddAttribute("shellScript", this->CreateString(makecmd.c_str())); + buildphase->AddAttribute("shellScript", + this->CreateString(makecmd.c_str())); } @@ -1102,17 +1120,17 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, } // Add define flags - this->CurrentLocalGenerator->AppendFlags(defFlags, + this->CurrentLocalGenerator-> + AppendFlags(defFlags, this->CurrentMakefile->GetDefineFlags()); cmSystemTools::ReplaceString(defFlags, "\"", "\\\""); cmSystemTools::ReplaceString(flags, "\"", "\\\""); cmSystemTools::ReplaceString(cflags, "\"", "\\\""); if(this->XcodeVersion > 15) { - buildSettings-> - AddAttribute("GCC_PREPROCESSOR_DEFINITIONS", + buildSettings->AddAttribute + ("GCC_PREPROCESSOR_DEFINITIONS", this->CreateString("CMAKE_INTDIR=\\\\\\\"$(CONFIGURATION)\\\\\\\"")); - } std::string extraLinkOptions; if(target.GetType() == cmTarget::EXECUTABLE) @@ -1122,13 +1140,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, } if(target.GetType() == cmTarget::SHARED_LIBRARY) { - extraLinkOptions = - this->CurrentMakefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + extraLinkOptions = this->CurrentMakefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); } if(target.GetType() == cmTarget::MODULE_LIBRARY) { - extraLinkOptions = - this->CurrentMakefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + extraLinkOptions = this->CurrentMakefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); } const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); @@ -1490,7 +1508,8 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget) buildSettings, fileTypeString, productTypeString, productName, globalConfig); target->AddAttribute("buildSettings", buildSettings); - cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST); + cmXCodeObject* dependencies = + this->CreateObject(cmXCodeObject::OBJECT_LIST); target->AddAttribute("dependencies", dependencies); target->AddAttribute("name", this->CreateString(productName.c_str())); target->AddAttribute("productName",this->CreateString(productName.c_str())); @@ -1502,12 +1521,14 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget) void cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget) { - std::string configTypes = this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES"); + std::string configTypes = + this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES"); std::vector configVectorIn; std::vector configVector; configVectorIn.push_back(configTypes); cmSystemTools::ExpandList(configVectorIn, configVector); - cmXCodeObject* configlist = this->CreateObject(cmXCodeObject::XCConfigurationList); + cmXCodeObject* configlist = + this->CreateObject(cmXCodeObject::XCConfigurationList); cmXCodeObject* buildConfigurations = this->CreateObject(cmXCodeObject::OBJECT_LIST); configlist->AddAttribute("buildConfigurations", buildConfigurations); @@ -1521,7 +1542,8 @@ void cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, this->CreateObjectReference(configlist)); for(unsigned int i = 0; i < configVector.size(); ++i) { - cmXCodeObject* config = this->CreateObject(cmXCodeObject::XCBuildConfiguration); + cmXCodeObject* config = + this->CreateObject(cmXCodeObject::XCBuildConfiguration); buildConfigurations->AddObject(config); cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); @@ -1540,7 +1562,8 @@ void cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, { configlist->AddAttribute("defaultConfigurationName", this->CreateString(configVector[0].c_str())); - configlist->AddAttribute("defaultConfigurationIsVisible", this->CreateString("0")); + configlist->AddAttribute("defaultConfigurationIsVisible", + this->CreateString("0")); } } @@ -1572,12 +1595,14 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget, buildSettings, fileTypeString, productTypeString, productName, globalConfig); target->AddAttribute("buildSettings", buildSettings); - cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST); + cmXCodeObject* dependencies = + this->CreateObject(cmXCodeObject::OBJECT_LIST); target->AddAttribute("dependencies", dependencies); target->AddAttribute("name", this->CreateString(productName.c_str())); target->AddAttribute("productName",this->CreateString(productName.c_str())); - cmXCodeObject* fileRef = this->CreateObject(cmXCodeObject::PBXFileReference); + cmXCodeObject* fileRef = + this->CreateObject(cmXCodeObject::PBXFileReference); fileRef->AddAttribute("explicitFileType", this->CreateString(fileTypeString.c_str())); fileRef->AddAttribute("path", this->CreateString(productName.c_str())); @@ -1624,7 +1649,8 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target, // now avoid circular references if dependTarget already // depends on target then skip it. Circular references crashes // xcode - cmXCodeObject* dependTargetDepends = dependTarget->GetObject("dependencies"); + cmXCodeObject* dependTargetDepends = + dependTarget->GetObject("dependencies"); if(dependTargetDepends) { if(dependTargetDepends->HasObject(target->GetPBXTargetDependency())) @@ -1695,7 +1721,8 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings, } //---------------------------------------------------------------------------- -void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(cmXCodeObject* target, +void cmGlobalXCodeGenerator +::AppendBuildSettingAttribute(cmXCodeObject* target, const char* attribute, const char* value, const char* configName) @@ -1711,12 +1738,15 @@ void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(cmXCodeObject* target, { // There are multiple configurations. Add the setting to the // buildSettings of the configuration name given. - cmXCodeObject* configurationList = target->GetObject("buildConfigurationList")->GetObject(); - cmXCodeObject* buildConfigs = configurationList->GetObject("buildConfigurations"); + cmXCodeObject* configurationList = + target->GetObject("buildConfigurationList")->GetObject(); + cmXCodeObject* buildConfigs = + configurationList->GetObject("buildConfigurations"); std::vector list = buildConfigs->GetObjectList(); // each configuration and the target itself has a buildSettings in it //list.push_back(target); - for(std::vector::iterator i = list.begin(); i != list.end(); ++i) + for(std::vector::iterator i = list.begin(); + i != list.end(); ++i) { if(configName) { @@ -1736,7 +1766,8 @@ void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(cmXCodeObject* target, } //---------------------------------------------------------------------------- -void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) +void cmGlobalXCodeGenerator +::AddDependAndLinkInformation(cmXCodeObject* target) { cmTarget* cmtarget = target->GetTarget(); if(!cmtarget) @@ -1755,7 +1786,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) emitted.insert(cmtarget->GetName()); // Loop over all library dependencies. - const cmTarget::LinkLibraryVectorType& tlibs = cmtarget->GetLinkLibraries(); + const cmTarget::LinkLibraryVectorType& tlibs = + cmtarget->GetLinkLibraries(); for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); lib != tlibs.end(); ++lib) { @@ -1891,15 +1923,16 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) { cmTarget& cmtarget = l->second; - // add the soon to be generated Info.plist file as a source for a MACOSX_BUNDLE - // file + // add the soon to be generated Info.plist file as a source for a + // MACOSX_BUNDLE file if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE")) { cmSourceFile file; file.SetName("Info", this->CurrentMakefile->GetCurrentOutputDirectory(), "plist", false); - cmtarget.GetSourceFiles().push_back(this->CurrentMakefile->AddSource(file)); + cmtarget.GetSourceFiles().push_back + (this->CurrentMakefile->AddSource(file)); } std::vector & classes = cmtarget.GetSourceFiles(); @@ -1911,20 +1944,22 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, std::string const& source = sf->GetFullPath(); cmSourceGroup& sourceGroup = mf->FindSourceGroup(source.c_str(), sourceGroups); - cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(cmtarget, &sourceGroup); + cmXCodeObject* pbxgroup = + this->CreateOrGetPBXGroup(cmtarget, &sourceGroup); this->GroupMap[sf] = pbxgroup; } } } } //---------------------------------------------------------------------------- -cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(cmTarget& cmtarget, - cmSourceGroup* sg) +cmXCodeObject* cmGlobalXCodeGenerator +::CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg) { cmStdString s = cmtarget.GetName(); s += "/"; s += sg->GetName(); - std::map::iterator i = this->GroupNameMap.find(s); + std::map::iterator i = + this->GroupNameMap.find(s); if(i != this->GroupNameMap.end()) { return i->second; @@ -1968,10 +2003,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(cmTarget& cmtarget, } //---------------------------------------------------------------------------- -void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root, +void cmGlobalXCodeGenerator +::CreateXCodeObjects(cmLocalGenerator* root, std::vector& - generators - ) + generators) { this->ClearXCodeObjects(); this->RootObject = 0; @@ -1984,7 +2019,8 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root, cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST); if(this->XcodeVersion == 15) { - developBuildStyle->AddAttribute("name", this->CreateString("Development")); + developBuildStyle->AddAttribute("name", + this->CreateString("Development")); developBuildStyle->AddAttribute("buildSettings", group); listObjs->AddObject(developBuildStyle); group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); @@ -2097,8 +2133,10 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root, comment += this->CurrentProject; comment += "\""; configlist->SetComment(comment.c_str()); - configlist->AddAttribute("defaultConfigurationIsVisible", this->CreateString("0")); - configlist->AddAttribute("defaultConfigurationName", this->CreateString("Debug")); + configlist->AddAttribute("defaultConfigurationIsVisible", + this->CreateString("0")); + configlist->AddAttribute("defaultConfigurationName", + this->CreateString("Debug")); cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); const char* osxArch = @@ -2173,7 +2211,8 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( std::vector& targets) { - cmGeneratedFileStream makefileStream(this->CurrentXCodeHackMakefile.c_str()); + cmGeneratedFileStream + makefileStream(this->CurrentXCodeHackMakefile.c_str()); if(!makefileStream) { cmSystemTools::Error("Could not create", @@ -2185,8 +2224,8 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( // correctly by xcode makefileStream << "# DO NOT EDIT\n"; makefileStream << "# This makefile makes sure all linkable targets are \n"; - makefileStream - << "# up-to-date with anything they link to,avoiding a bug in XCode 1.5\n"; + makefileStream << "# up-to-date with anything they link to,avoiding a " + "bug in XCode 1.5\n"; for(std::vector::const_iterator ct = this->CurrentConfigurationTypes.begin(); ct != this->CurrentConfigurationTypes.end(); ++ct) @@ -2230,8 +2269,8 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( cmXCodeObject* target = *i; std::map const& deplibs = target->GetDependLibraries(); - for(std::map::const_iterator ci = deplibs.begin(); - ci != deplibs.end(); ++ci) + for(std::map::const_iterator ci + = deplibs.begin(); ci != deplibs.end(); ++ci) { for(cmXCodeObject::StringVec::const_iterator d = ci->second.begin(); d != ci->second.end(); ++d) @@ -2271,7 +2310,8 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( { // Create a rule for this target. std::string tfull = t->GetFullPath(configName); - makefileStream << this->ConvertToRelativeForMake(tfull.c_str()) << ":"; + makefileStream << this->ConvertToRelativeForMake(tfull.c_str()) + << ":"; // List dependencies if any exist. std::map::const_iterator @@ -2355,7 +2395,8 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root, { if ((l->second.GetType() != cmTarget::INSTALL_FILES) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS) - && (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) + && (strncmp(l->first.c_str(), + "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) && banned.find(l->second.GetName()) == banned.end()) { cmTarget& target = l->second; @@ -2364,7 +2405,8 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root, // this target for(unsigned int k =0; k < cc->GetDepends().size(); k++) { - if(cmSystemTools::GetFilenameName(cc->GetDepends()[k]) == target.GetFullName()) + if(cmSystemTools::GetFilenameName + (cc->GetDepends()[k]) == target.GetFullName()) { sameAsTarget = true; } diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 020c706..669942a 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -138,7 +138,8 @@ private: cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, cmSourceFile* sf, cmTarget& cmtarget); - void CreateXCodeTargets(cmLocalGenerator* gen, std::vector&); + void CreateXCodeTargets(cmLocalGenerator* gen, + std::vector&); void AddDependTarget(cmXCodeObject* target, cmXCodeObject* dependTarget); void ConfigureOutputPaths(); diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index b611796..4e7c777 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -55,7 +55,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf) err += ". Did you mean "; err += name; err += "( "; - for(std::vector::const_iterator a = this->Args.begin(); + for(std::vector::const_iterator a = + this->Args.begin(); a != this->Args.end();++a) { err += (a->Quoted?"\"":""); @@ -86,7 +87,8 @@ bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, void cmIfFunctionBlocker:: ScopeEnded(cmMakefile &mf) { - std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: "; + std::string errmsg = "The end of a CMakeLists file was reached with an " + "IF statement that was not closed properly.\nWithin the directory: "; errmsg += mf.GetCurrentDirectory(); errmsg += "\nThe arguments are: "; for(std::vector::const_iterator j = this->Args.begin(); @@ -100,13 +102,15 @@ ScopeEnded(cmMakefile &mf) cmSystemTools::Message(errmsg.c_str(), "Warning"); } -bool cmIfCommand::InvokeInitialPass(const std::vector& args) +bool cmIfCommand +::InvokeInitialPass(const std::vector& args) { char* errorString = 0; std::vector expandedArguments; this->Makefile->ExpandArguments(args, expandedArguments); - bool isTrue = cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile); + bool isTrue = + cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile); if (errorString) { diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index 9e55762..a8a7b81 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -154,9 +154,9 @@ public: "variable is true or false just if it has been set."; } - // this is a shared function for both If and Else to determine if - // the arguments were valid, and if so, was the response true. If there is an - // error, the errorString will be set. + // this is a shared function for both If and Else to determine if the + // arguments were valid, and if so, was the response true. If there is + // an error, the errorString will be set. static bool IsTrue(const std::vector &args, char** errorString, const cmMakefile *mf); diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index d418698..6c2b3aa 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -46,7 +46,8 @@ bool cmIncludeCommand::InitialPass(std::vector const& args) fname = mfile.c_str(); } } - bool readit = this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(), + bool readit = + this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(), fname.c_str() ); if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured()) { diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index eb07eb7..9dc2a25 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -17,7 +17,8 @@ #include "cmIncludeDirectoryCommand.h" // cmIncludeDirectoryCommand -bool cmIncludeDirectoryCommand::InitialPass(std::vector const& args) +bool cmIncludeDirectoryCommand +::InitialPass(std::vector const& args) { if(args.size() < 1 ) { @@ -43,7 +44,8 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector const& args { if(i->size() == 0) { - cmSystemTools::Error("Empty Include Directory Passed into INCLUDE_DIRECTORIES command."); + cmSystemTools::Error + ("Empty Include Directory Passed into INCLUDE_DIRECTORIES command."); } std::string unixPath = *i; cmSystemTools::ConvertToUnixSlashes(unixPath); diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index 7a9248f..2944ebd 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -17,11 +17,13 @@ #include "cmIncludeExternalMSProjectCommand.h" // cmIncludeExternalMSProjectCommand -bool cmIncludeExternalMSProjectCommand::InitialPass(std::vector const& args) +bool cmIncludeExternalMSProjectCommand +::InitialPass(std::vector const& args) { if(args.size() < 2) { - this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect number of arguments"); + this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect " + "number of arguments"); return false; } // only compile this for win32 to avoid coverage errors diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 4e88e99..c597172 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -22,9 +22,9 @@ /** \class cmIncludeExternalMSProjectCommand * \brief Specify an external MS project file for inclusion in the workspace. * - * cmIncludeExternalMSProjectCommand is used to specify an externally generated - * Microsoft project file for inclusion in the default workspace generated by - * CMake. + * cmIncludeExternalMSProjectCommand is used to specify an externally + * generated Microsoft project file for inclusion in the default workspace + * generated by CMake. */ class cmIncludeExternalMSProjectCommand : public cmCommand { diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx index 56c4e9b..f94b971 100644 --- a/Source/cmIncludeRegularExpressionCommand.cxx +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -17,7 +17,8 @@ #include "cmIncludeRegularExpressionCommand.h" // cmIncludeRegularExpressionCommand -bool cmIncludeRegularExpressionCommand::InitialPass(std::vector const& args) +bool cmIncludeRegularExpressionCommand +::InitialPass(std::vector const& args) { if((args.size() < 1) || (args.size() > 2)) { diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index f7fc412..7b31dc8 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -65,7 +65,8 @@ public: " INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain])\n" "Set the regular expressions used in dependency checking. Only files " "matching regex_match will be traced as dependencies. Only files " - "matching regex_complain will generate warnings if they cannot be found " + "matching regex_complain will generate warnings if they cannot be " + "found " "(standard header paths are not searched). The defaults are:\n" " regex_match = \"^.*$\" (match everything)\n" " regex_complain = \"^$\" (match empty string only)"; diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index f325f06..fd1808a 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -108,13 +108,15 @@ public: "Executables are always treated as runtime targets. " "Static libraries are always treated as archive targets. " "Module libraries are always treated as library targets. " - "For non-DLL platforms shared libraries are treated as library targets. " + "For non-DLL platforms shared libraries are treated as library " + "targets. " "For DLL platforms the DLL part of a shared library is treated as " "a runtime target and the corresponding import library is treated as " "an archive target. " "All Windows-based systems including Cygwin are DLL platforms. " "The ARCHIVE, LIBRARY, and RUNTIME " - "arguments change the type of target to which the subsequent properties " + "arguments change the type of target to which the subsequent " + "properties " "apply. If none is given the installation properties apply to " "all target types. If only one is given then only targets of that " "type will be installed (which can be used to install just a DLL or " @@ -131,12 +133,12 @@ public: " INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)\n" "will install myExe to /bin and myStaticLib to " "/lib/static. " - "On non-DLL platforms mySharedLib will be installed to /lib and " - "/some/full/path. On DLL platforms the mySharedLib DLL will be " + "On non-DLL platforms mySharedLib will be installed to /lib " + "and /some/full/path. On DLL platforms the mySharedLib DLL will be " "installed to /bin and /some/full/path and its import library " "will be installed to /lib/static and /some/full/path. " - "On non-DLL platforms mySharedLib will be installed to /lib and " - "/some/full/path." + "On non-DLL platforms mySharedLib will be installed to /lib " + "and /some/full/path." "\n" "The FILES signature:\n" " INSTALL(FILES files... DESTINATION \n" diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index b78a7ce..5b75456 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -17,7 +17,8 @@ #include "cmInstallFilesCommand.h" // cmExecutableCommand -bool cmInstallFilesCommand::InitialPass(std::vector const& argsIn) +bool cmInstallFilesCommand +::InitialPass(std::vector const& argsIn) { if(argsIn.size() < 2) { diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index f1154fb..3267779 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -47,7 +47,8 @@ cmInstallGenerator } //---------------------------------------------------------------------------- -void cmInstallGenerator::AddInstallRule( +void cmInstallGenerator +::AddInstallRule( std::ostream& os, const char* dest, int type, @@ -55,7 +56,7 @@ void cmInstallGenerator::AddInstallRule( bool optional /* = false */, const char* properties /* = 0 */, const char* permissions /* = 0 */, - std::vector const& configurations /* = std::vector() */, + std::vector const& configurations, const char* component /* = 0 */, const char* rename /* = 0 */ ) diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index 017c63a..53c8c43 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -39,7 +39,8 @@ public: const char* file, bool optional = false, const char* properties = 0, const char* permissions = 0, - std::vector const& configurations =std::vector(), + std::vector const& configurations + = std::vector(), const char* component = 0, const char* rename = 0 ); diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 3a72810..1830c5e 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -17,7 +17,8 @@ #include "cmInstallProgramsCommand.h" // cmExecutableCommand -bool cmInstallProgramsCommand::InitialPass(std::vector const& args) +bool cmInstallProgramsCommand +::InitialPass(std::vector const& args) { if(args.size() < 2) { @@ -89,7 +90,8 @@ void cmInstallProgramsCommand::FinalPass() * present in the build tree. If a full path is given, it is just * returned. */ -std::string cmInstallProgramsCommand::FindInstallSource(const char* name) const +std::string cmInstallProgramsCommand +::FindInstallSource(const char* name) const { if(cmSystemTools::FileIsFullPath(name)) { diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index b5cf240..b7be4cb 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -268,7 +268,8 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target, } //---------------------------------------------------------------------------- -void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os, +void cmInstallTargetGenerator +::AddInstallNamePatchRule(std::ostream& os, const char* destination) { // Build a map of build-tree install_name to install-tree install_name for @@ -291,13 +292,15 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os, lib != this->Target->GetName()) && (j->second == cmTarget::GENERAL || j->second == linkType)) { - if(cmTarget* tgt = this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator()->FindTarget(0, lib.c_str())) + if(cmTarget* tgt = this->Target->GetMakefile()-> + GetLocalGenerator()->GetGlobalGenerator()-> + FindTarget(0, lib.c_str())) { if(tgt->GetType() == cmTarget::SHARED_LIBRARY) { - // If the build tree and install tree use different path components - // of the install_name field then we need to create a mapping to be - // applied after installation. + // If the build tree and install tree use different path + // components of the install_name field then we need to create a + // mapping to be applied after installation. std::string for_build = tgt->GetInstallNameDirForBuildTree(config); std::string for_install = tgt->GetInstallNameDirForInstallTree(config); @@ -326,8 +329,10 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os, std::string new_id; if(this->Target->GetType() == cmTarget::SHARED_LIBRARY) { - std::string for_build = this->Target->GetInstallNameDirForBuildTree(config); - std::string for_install = this->Target->GetInstallNameDirForInstallTree(config); + std::string for_build = + this->Target->GetInstallNameDirForBuildTree(config); + std::string for_install = + this->Target->GetInstallNameDirForInstallTree(config); if(for_build != for_install) { // Prepare to refer to the install-tree install_name. @@ -340,8 +345,8 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os, // install_name value and references. if(!new_id.empty() || !install_name_remap.empty()) { - std::string component_test = - "NOT CMAKE_INSTALL_COMPONENT OR \"${CMAKE_INSTALL_COMPONENT}\" MATCHES \"^("; + std::string component_test = "NOT CMAKE_INSTALL_COMPONENT OR " + "\"${CMAKE_INSTALL_COMPONENT}\" MATCHES \"^("; component_test += this->Component; component_test += ")$\""; os << "IF(" << component_test << ")\n"; diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index 777b7af..693a908 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -30,7 +30,8 @@ public: cmInstallTargetGenerator( cmTarget& t, const char* dest, bool implib, const char* permissions = "", - std::vector const& configurations =std::vector(), + std::vector const& configurations + = std::vector(), const char* component = "" ); virtual ~cmInstallTargetGenerator(); diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index 5a16d58..42f83ac 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -17,7 +17,8 @@ #include "cmInstallTargetsCommand.h" // cmExecutableCommand -bool cmInstallTargetsCommand::InitialPass(std::vector const& args) +bool cmInstallTargetsCommand +::InitialPass(std::vector const& args) { if(args.size() < 2 ) { @@ -36,7 +37,8 @@ bool cmInstallTargetsCommand::InitialPass(std::vector const& args) ++s; if ( s == args.end() ) { - this->SetError("called with RUNTIME_DIRECTORY but no actual directory"); + this->SetError("called with RUNTIME_DIRECTORY but no actual " + "directory"); return false; } diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 398c63e..6516f20 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -38,7 +38,7 @@ bool cmListCommand::InitialPass(std::vector const& args) { return this->HandleGetCommand(args); } - if(subCommand == "SET") + if(subCommand == "SET" || subCommand == "APPEND") { return this->HandleSetCommand(args); } diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index 99d3314..e510d19 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -67,18 +67,21 @@ public: " LIST(LENGTH )\n" " LIST(GET [ ...] " ")\n" - " LIST(SET [ ...])\n" + " LIST(APPEND [ ...])\n" " LIST(INSERT [ ...])\n" - " LIST(REMOVE [ ...])\n" - " LIST(REMOVE_ITEM [ ...])\n" - " LIST(SORT )\n" - " LIST(REVERSE )\n" + " LIST(REMOVE [ ...])\n" + " LIST(REMOVE_ITEM [ ...])\n" + " LIST(SORT )\n" + " LIST(REVERSE )\n" "LENGTH will return a given list's length.\n" "GET will return list of elements specified by indices from the list.\n" - "SET will append elements to the list.\n" + "APPEND will append elements to the list.\n" "INSERT will insert elements to the list to the specified location.\n" "When specifying an index, negative value corresponds to index from the" " end of the list.\n" + "REMOVE and REMOVE_ITEM will remove item from the list. The difference " + "is that REMOVE will remove the given items, while REMOVE_ITEM will " + "remove the item at the given indices.\n" ; } -- cgit v0.12