This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via bea9335bf363d030d72882c3a5cf01f4dd4af3c3 (commit) via 89a7552ae80c2c4f3a4cdaae8a5d706b3ce2fc43 (commit) via 27a57c93a6c64c2c3aaa5201e57f4ebde3034f64 (commit) via ddd22ec40f664fe612c8a0d7d2d482ae6bd4e9c0 (commit) via a317614e1efd3b5de4af155c0045a198a9f175d4 (commit) via d2e3e49991fbbde1192df6156a7bfe70dd9f3319 (commit) via 0cd64d7028d5f5e53707f38adbd609119285e765 (commit) via 0aadff19246870b38b048ca9876ec1dd59c69d69 (commit) via af9d23d180be79559e266bbdeccb49f8d28516c7 (commit) from 828f247c9bb36f6e378c773497b6ce0b333839b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bea9335bf363d030d72882c3a5cf01f4dd4af3c3 commit bea9335bf363d030d72882c3a5cf01f4dd4af3c3 Merge: 828f247 89a7552 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 19 16:19:01 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Sep 19 16:19:01 2016 -0400 Merge topic 'cleanup-Convert' into next 89a7552a Fix style in topic 'cleanup-Convert' 27a57c93 cmOutputConverter: Remove now-obsolete Convert method ddd22ec4 Convert: Inline uses of START_OUTPUT a317614e Convert: Remove HOME_OUTPUT enum value d2e3e499 Ninja: Update comment variable reference 0cd64d70 Convert: Move access to BinaryDirectory out of loops 0aadff19 Convert: Inline uses of HOME_OUTPUT af9d23d1 Common: Use a string instead of enum for WorkingDirectory https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89a7552ae80c2c4f3a4cdaae8a5d706b3ce2fc43 commit 89a7552ae80c2c4f3a4cdaae8a5d706b3ce2fc43 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 19 16:17:39 2016 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:39 2016 -0400 Fix style in topic 'cleanup-Convert' diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5dbe57c..9b12354 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -181,8 +181,7 @@ void cmLocalGenerator::GenerateTestFiles() for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) { // TODO: Use add_subdirectory instead? std::string outP = i->GetDirectory().GetCurrentBinary(); - outP = this->ConvertToRelativePath(parentBinDir, - outP); + outP = this->ConvertToRelativePath(parentBinDir, outP); outP = cmOutputConverter::EscapeForCMake(outP); fout << "subdirs(" << outP << ")" << std::endl; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27a57c93a6c64c2c3aaa5201e57f4ebde3034f64 commit 27a57c93a6c64c2c3aaa5201e57f4ebde3034f64 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 19:01:20 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:21 2016 -0400 cmOutputConverter: Remove now-obsolete Convert method diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index df68280..fdf0b0e 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -47,13 +47,6 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const return this->ConfigName; } -std::string cmCommonTargetGenerator::Convert( - std::string const& source, cmOutputConverter::RelativeRoot relative, - cmOutputConverter::OutputFormat output) -{ - return this->LocalGenerator->Convert(source, relative, output); -} - const char* cmCommonTargetGenerator::GetFeature(const std::string& feature) { return this->GeneratorTarget->GetFeature(feature, this->ConfigName); diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index b433c18..4c52fe5 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -57,10 +57,6 @@ protected: // The windows module definition source file (.def), if any. cmSourceFile const* ModuleDefinitionFile; - std::string Convert(std::string const& source, - cmOutputConverter::RelativeRoot relative, - cmOutputConverter::OutputFormat output); - void AppendFortranFormatFlags(std::string& flags, cmSourceFile const& source); diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index dca0e1d..7f6edf2 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -46,29 +46,6 @@ std::string cmOutputConverter::ConvertToOutputForExisting( return this->ConvertToOutputFormat(remote, format); } -std::string cmOutputConverter::ConvertToRelativePath( - const std::string& source, RelativeRoot relative) const -{ - std::string result; - - switch (relative) { - case START_OUTPUT: - result = this->StateSnapshot.GetDirectory().GetCurrentBinary(); - break; - } - - return this->ConvertToRelativePath(result, source); -} - -std::string cmOutputConverter::Convert(const std::string& source, - RelativeRoot relative, - OutputFormat output) const -{ - // Convert the path to a relative path. - std::string result = this->ConvertToRelativePath(source, relative); - return this->ConvertToOutputFormat(result, output); -} - std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, OutputFormat output) const { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index b2ae936..cc24e53 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -24,24 +24,6 @@ class cmOutputConverter public: cmOutputConverter(cmState::Snapshot snapshot); - /** - * Convert something to something else. This is a centralized conversion - * routine used by the generators to handle relative paths and the like. - * The flags determine what is actually done. - * - * relative: treat the argument as a directory and convert it to make it - * relative or full or unchanged. If relative (HOME, START etc) then that - * specifies what it should be relative to. - * - * output: make the result suitable for output to a... - * - * optional: should any relative path operation be controlled by the rel - * path setting - */ - enum RelativeRoot - { - START_OUTPUT - }; enum OutputFormat { SHELL, @@ -50,10 +32,6 @@ public: }; std::string ConvertToOutputFormat(const std::string& source, OutputFormat output) const; - std::string Convert(const std::string& remote, RelativeRoot local, - OutputFormat output) const; - std::string ConvertToRelativePath(const std::string& remote, - RelativeRoot local) const; std::string ConvertDirectorySeparatorsForShell( const std::string& source) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddd22ec40f664fe612c8a0d7d2d482ae6bd4e9c0 commit ddd22ec40f664fe612c8a0d7d2d482ae6bd4e9c0 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 18:52:40 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:17 2016 -0400 Convert: Inline uses of START_OUTPUT diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 40f3e81..5dbe57c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1410,7 +1410,9 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, #endif // Normal behavior. - return this->Convert(lib, START_OUTPUT, format); + return this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), + format); } /** diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index f2a13bc..82e4d2c 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -500,8 +500,10 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( const std::vector<std::string>& outputs = ccg.GetOutputs(); if (!outputs.empty()) { if (ccg.GetWorkingDirectory().empty()) { - output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + output = this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]), + cmOutputConverter::SHELL); } else { output = this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3f8dc17..23d1571 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1002,8 +1002,10 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( const std::vector<std::string>& outputs = ccg.GetOutputs(); if (!outputs.empty()) { if (workingDir.empty()) { - output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + output = this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]), + cmOutputConverter::SHELL); } else { output = this->ConvertToOutputFormat(outputs[0], @@ -1095,8 +1097,9 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; - remove += this->Convert(cleanfile, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + remove += this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cleanfile), + cmOutputConverter::SHELL); commands.push_back(remove); // For the main clean rule add per-language cleaning. diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index d344dc5..77ec6f7 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -205,7 +205,9 @@ std::string cmLocalVisualStudioGenerator::ConstructScript( } if (workingDirectory.empty()) { - script += this->Convert(cmd.c_str(), START_OUTPUT, SHELL); + script += this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cmd), + cmOutputConverter::SHELL); } else { script += this->ConvertToOutputFormat(cmd.c_str(), SHELL); } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index c1079a2..82bd1a3 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -138,14 +138,20 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. - std::string targetOutPath = this->Convert( - targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); - std::string targetOutPathReal = - this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), + cmOutputConverter::SHELL); + std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), + cmOutputConverter::SHELL); std::string targetOutPathImport = - this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), + targetFullPathImport), + cmOutputConverter::SHELL); // Get the language to use for linking this executable. std::string linkLanguage = @@ -319,14 +325,19 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + + objectDir = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), + cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); cmOutputConverter::OutputFormat output = (useWatcomQuote) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; - std::string target = this->Convert( - targetFullPathReal, cmOutputConverter::START_OUTPUT, output); + std::string target = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), + output); vars.Target = target.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 8d90089..1d66d52 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -312,17 +312,25 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // arguments. std::string targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); - std::string targetOutPath = this->Convert( - targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); - std::string targetOutPathSO = - this->Convert(targetFullPathSO, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); - std::string targetOutPathReal = - this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + + std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), + cmOutputConverter::SHELL); + std::string targetOutPathSO = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO), + cmOutputConverter::SHELL); + std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), + cmOutputConverter::SHELL); std::string targetOutPathImport = - this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), + targetFullPathImport), + cmOutputConverter::SHELL); this->NumberOfProgressActions++; if (!this->NoRuleMessages) { @@ -536,14 +544,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + + objectDir = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), + cmOutputConverter::SHELL); + vars.ObjectDir = objectDir.c_str(); cmOutputConverter::OutputFormat output = (useWatcomQuote) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; - std::string target = this->Convert( - targetFullPathReal, cmOutputConverter::START_OUTPUT, output); + std::string target = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), + output); vars.Target = target.c_str(); vars.LinkLibraries = linkLibs.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 5f39a85..014feb9 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -526,14 +526,17 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } } - targetOutPathReal = - this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), + cmOutputConverter::SHELL); targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); - targetOutPathCompilePDB = - this->Convert(targetFullPathCompilePDB, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + targetOutPathCompilePDB = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), + targetFullPathCompilePDB), + cmOutputConverter::SHELL); if (this->LocalGenerator->IsMinGWMake() && cmHasLiteralSuffix(targetOutPathCompilePDB, "\\")) { @@ -555,12 +558,16 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( this->LocalGenerator->ConvertToOutputFormat(obj, cmOutputConverter::SHELL); vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + objectDir = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), + cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); - objectFileDir = this->Convert(objectFileDir, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + objectFileDir = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), objectFileDir), + cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); vars.Flags = flags.c_str(); @@ -1231,8 +1238,10 @@ public: void Feed(std::string const& obj) { // Construct the name of the next object. - this->NextObject = this->LocalGenerator->Convert( - obj, cmOutputConverter::START_OUTPUT, cmOutputConverter::RESPONSE); + this->NextObject = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), obj), + cmOutputConverter::RESPONSE); // Roll over to next string if the limit will be exceeded. if (this->LengthLimit != std::string::npos && @@ -1474,8 +1483,10 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; - link_command += this->Convert( - linkScriptName, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); + link_command += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), linkScriptName), + cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; makefile_commands.push_back(link_command); makefile_depends.push_back(linkScriptName); @@ -1506,9 +1517,9 @@ bool cmMakefileTargetGenerator::CheckUseResponseFileForObjects( if (size_t const limit = calculateCommandLineLengthLimit()) { // Compute the total length of our list of object files with room // for argument separation and quoting. This does not convert paths - // relative to START_OUTPUT like the final list will be, so the actual - // list will likely be much shorter than this. However, in the worst - // case all objects will remain as absolute paths. + // relative to CMAKE_CURRENT_BINARY_DIR like the final list will be, so the + // actual list will likely be much shorter than this. However, in the + // worst case all objects will remain as absolute paths. size_t length = 0; for (std::vector<std::string>::const_iterator i = this->Objects.begin(); i != this->Objects.end(); ++i) { @@ -1709,13 +1720,17 @@ void cmMakefileTargetGenerator::GenDefFile( cmd = this->LocalGenerator->ConvertToOutputFormat( cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; - cmd += this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + cmd += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), + cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; - cmd += this->Convert(objlist_file, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + cmd += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), objlist_file), + cmOutputConverter::SHELL); real_link_commands.insert(real_link_commands.begin(), cmd); // create a list of obj files for the -E __create_def to read cmGeneratedFileStream fout(objlist_file.c_str()); @@ -1733,9 +1748,10 @@ void cmMakefileTargetGenerator::GenDefFile( // now add the def file link flag linkFlags += " "; linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); - linkFlags += - this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT, - cmOutputConverter::SHELL); + linkFlags += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), + cmOutputConverter::SHELL); linkFlags += " "; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a317614e1efd3b5de4af155c0045a198a9f175d4 commit a317614e1efd3b5de4af155c0045a198a9f175d4 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 18:41:42 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:13 2016 -0400 Convert: Remove HOME_OUTPUT enum value diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 4f12ae0..dca0e1d 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -52,9 +52,6 @@ std::string cmOutputConverter::ConvertToRelativePath( std::string result; switch (relative) { - case HOME_OUTPUT: - result = this->GetState()->GetBinaryDirectory(); - break; case START_OUTPUT: result = this->StateSnapshot.GetDirectory().GetCurrentBinary(); break; diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index f4eedcf..b2ae936 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -40,7 +40,6 @@ public: */ enum RelativeRoot { - HOME_OUTPUT, START_OUTPUT }; enum OutputFormat https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2e3e49991fbbde1192df6156a7bfe70dd9f3319 commit d2e3e49991fbbde1192df6156a7bfe70dd9f3319 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 18:40:45 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:09 2016 -0400 Ninja: Update comment variable reference diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b2384b0..f87a788 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -642,7 +642,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } } } - // If we have any PRE_LINK commands, we need to go back to HOME_OUTPUT for + // If we have any PRE_LINK commands, we need to go back to CMAKE_BINARY_DIR + // for // the link commands. if (!preLinkCmdLines.empty()) { const std::string homeOutDir = localGen.ConvertToOutputFormat( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cd64d7028d5f5e53707f38adbd609119285e765 commit 0cd64d7028d5f5e53707f38adbd609119285e765 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Sep 7 23:31:04 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:06 2016 -0400 Convert: Move access to BinaryDirectory out of loops diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 9fb4221..ba0617f 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -429,16 +429,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, modFile += "/"; modFile += *i; modFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), modFile), + this->LocalGenerator->ConvertToRelativePath(binDir, modFile), cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), stampFile), + this->LocalGenerator->ConvertToRelativePath(binDir, stampFile), cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cdf4330..5f39a85 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -900,13 +900,13 @@ bool cmMakefileTargetGenerator::WriteMakeRule( // For multiple outputs, make the extra ones depend on the first one. std::vector<std::string> const output_depends(1, outputs[0]); + std::string binDir = this->LocalGenerator->GetBinaryDirectory(); for (std::vector<std::string>::const_iterator o = outputs.begin() + 1; o != outputs.end(); ++o) { // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. std::string const out = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), *o), + this->LocalGenerator->ConvertToRelativePath(binDir, *o), cmOutputConverter::SHELL); std::vector<std::string> output_commands; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0aadff19246870b38b048ca9876ec1dd59c69d69 commit 0aadff19246870b38b048ca9876ec1dd59c69d69 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 18:20:37 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:17:02 2016 -0400 Convert: Inline uses of HOME_OUTPUT diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d7e2c33..9fb4221 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -428,14 +428,18 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string modFile = mod_dir; modFile += "/"; modFile += *i; - modFile = this->LocalGenerator->Convert( - modFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL); + modFile = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), modFile), + cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; - stampFile = this->LocalGenerator->Convert( - stampFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL); + stampFile = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), stampFile), + cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; cmMakefile* mf = this->LocalGenerator->GetMakefile(); diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 94f4929..f2a13bc 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -145,7 +145,8 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference( return this->ConvertToOutputFormat(cmSystemTools::CollapseFullPath(path), format); } - return this->Convert(path, cmOutputConverter::HOME_OUTPUT, format); + return this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetBinaryDirectory(), path), format); } // Private methods. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9809be6..cdf4330 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -904,8 +904,10 @@ bool cmMakefileTargetGenerator::WriteMakeRule( o != outputs.end(); ++o) { // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. - std::string const out = this->Convert(*o, cmOutputConverter::HOME_OUTPUT, - cmOutputConverter::SHELL); + std::string const out = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), *o), + cmOutputConverter::SHELL); std::vector<std::string> output_commands; bool o_symbolic = false; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af9d23d180be79559e266bbdeccb49f8d28516c7 commit af9d23d180be79559e266bbdeccb49f8d28516c7 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sat Aug 27 18:32:49 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:16:58 2016 -0400 Common: Use a string instead of enum for WorkingDirectory diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 6167e2c..df68280 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -204,8 +204,9 @@ std::string cmCommonTargetGenerator::GetManifests() std::vector<std::string> manifests; for (std::vector<cmSourceFile const*>::iterator mi = manifest_srcs.begin(); mi != manifest_srcs.end(); ++mi) { - manifests.push_back(this->Convert( - (*mi)->GetFullPath(), this->LocalGenerator->GetWorkingDirectory(), + manifests.push_back(this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetWorkingDirectory(), (*mi)->GetFullPath()), cmOutputConverter::SHELL)); } diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 0e79293..97323c9 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -18,8 +18,9 @@ class cmGlobalGenerator; -cmLocalCommonGenerator::cmLocalCommonGenerator( - cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd) +cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg, + cmMakefile* mf, + std::string const& wd) : cmLocalGenerator(gg, mf) , WorkingDirectory(wd) { @@ -55,8 +56,9 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags( // Add a module output directory flag if necessary. std::string mod_dir = target->GetFortranModuleDirectory(); if (!mod_dir.empty()) { - mod_dir = - this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL); + mod_dir = this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->WorkingDirectory, mod_dir), + cmOutputConverter::SHELL); } else { mod_dir = this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT"); diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 9012afd..9454739 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -30,21 +30,18 @@ class cmLocalCommonGenerator : public cmLocalGenerator { public: cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf, - cmOutputConverter::RelativeRoot wd); + std::string const& wd); ~cmLocalCommonGenerator() CM_OVERRIDE; std::string const& GetConfigName() { return this->ConfigName; } - cmOutputConverter::RelativeRoot GetWorkingDirectory() const - { - return this->WorkingDirectory; - } + std::string GetWorkingDirectory() const { return this->WorkingDirectory; } std::string GetTargetFortranFlags(cmGeneratorTarget const* target, std::string const& config) CM_OVERRIDE; protected: - cmOutputConverter::RelativeRoot WorkingDirectory; + std::string WorkingDirectory; void SetConfigName(); std::string ConfigName; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index f651c6e..94f4929 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -34,7 +34,7 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) - : cmLocalCommonGenerator(gg, mf, cmOutputConverter::HOME_OUTPUT) + : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) , HomeRelativeOutputPath("") { this->TargetImplib = "$TARGET_IMPLIB"; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6fd319e..3f8dc17 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -94,7 +94,7 @@ static std::string cmSplitExtension(std::string const& in, std::string& base) cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3( cmGlobalGenerator* gg, cmMakefile* mf) - : cmLocalCommonGenerator(gg, mf, cmOutputConverter::START_OUTPUT) + : cmLocalCommonGenerator(gg, mf, mf->GetCurrentBinaryDirectory()) { this->MakefileVariableSize = 0; this->ColorMakefile = false; ----------------------------------------------------------------------- Summary of changes: Source/cmCommonTargetGenerator.cxx | 12 +--- Source/cmCommonTargetGenerator.h | 4 -- Source/cmDependsFortran.cxx | 10 ++-- Source/cmLocalCommonGenerator.cxx | 10 ++-- Source/cmLocalCommonGenerator.h | 9 +-- Source/cmLocalGenerator.cxx | 7 ++- Source/cmLocalNinjaGenerator.cxx | 11 ++-- Source/cmLocalUnixMakefileGenerator3.cxx | 13 +++-- Source/cmLocalVisualStudioGenerator.cxx | 4 +- Source/cmMakefileExecutableTargetGenerator.cxx | 33 +++++++---- Source/cmMakefileLibraryTargetGenerator.cxx | 42 +++++++++----- Source/cmMakefileTargetGenerator.cxx | 70 +++++++++++++++--------- Source/cmNinjaNormalTargetGenerator.cxx | 3 +- Source/cmOutputConverter.cxx | 26 --------- Source/cmOutputConverter.h | 23 -------- 15 files changed, 136 insertions(+), 141 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits