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 27d1525298d909d3272f287e479ec401d78cf29a (commit) via 5ab46ba2c0c10cac05269f1a30c6021c182310ae (commit) from 253d0ee84d3b86d8594bd7b82ed60f5464150295 (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=27d1525298d909d3272f287e479ec401d78cf29a commit 27d1525298d909d3272f287e479ec401d78cf29a Merge: 253d0ee 5ab46ba Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 19 16:01:16 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Sep 19 16:01:16 2016 -0400 Merge topic 'refactor-fortran-module-dir-lookup' into next 5ab46ba2 Revert topic 'refactor-fortran-module-dir-lookup' diff --cc Source/cmLocalCommonGenerator.cxx index 1e708c8,0e79293..97323c9 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@@ -54,14 -53,10 +54,11 @@@ std::string cmLocalCommonGenerator::Get } // Add a module output directory flag if necessary. - std::string mod_dir = target->GetFortranModuleDirectory( - this->WorkingDirectory == cmOutputConverter::HOME_OUTPUT - ? this->GetBinaryDirectory() - : this->GetCurrentBinaryDirectory()); + 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"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ab46ba2c0c10cac05269f1a30c6021c182310ae commit 5ab46ba2c0c10cac05269f1a30c6021c182310ae Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 19 16:00:58 2016 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 19 16:00:58 2016 -0400 Revert topic 'refactor-fortran-module-dir-lookup' It logically conflicts with another topic in 'next'. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f181cf6..1e21ac4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3883,35 +3883,23 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion, int& major, } } -std::string cmGeneratorTarget::GetFortranModuleDirectory( - std::string const& working_dir) const +std::string cmGeneratorTarget::GetFortranModuleDirectory() const { if (!this->FortranModuleDirectoryCreated) { this->FortranModuleDirectory = true; - this->FortranModuleDirectory = - this->CreateFortranModuleDirectory(working_dir); + this->FortranModuleDirectory = this->CreateFortranModuleDirectory(); } return this->FortranModuleDirectory; } -std::string cmGeneratorTarget::CreateFortranModuleDirectory( - std::string const& working_dir) const +std::string cmGeneratorTarget::CreateFortranModuleDirectory() const { std::string mod_dir; - std::string target_mod_dir; - if (const char* prop = this->GetProperty("Fortran_MODULE_DIRECTORY")) { - target_mod_dir = prop; - } else { - std::string const& default_mod_dir = - this->LocalGenerator->GetCurrentBinaryDirectory(); - if (default_mod_dir != working_dir) { - target_mod_dir = default_mod_dir; - } - } + const char* target_mod_dir = this->GetProperty("Fortran_MODULE_DIRECTORY"); const char* moddir_flag = this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_FLAG"); - if (!target_mod_dir.empty() && moddir_flag) { + if (target_mod_dir && moddir_flag) { // Compute the full path to the module directory. if (cmSystemTools::FileIsFullPath(target_mod_dir)) { // Already a full path. diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 8e17b8f..715220e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -537,13 +537,12 @@ public: void GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; - std::string GetFortranModuleDirectory(std::string const& working_dir) const; + std::string GetFortranModuleDirectory() const; private: void AddSourceCommon(const std::string& src); - std::string CreateFortranModuleDirectory( - std::string const& working_dir) const; + std::string CreateFortranModuleDirectory() const; mutable bool FortranModuleDirectoryCreated; mutable std::string FortranModuleDirectory; diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 2de28b8..0e79293 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -53,10 +53,7 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags( } // Add a module output directory flag if necessary. - std::string mod_dir = target->GetFortranModuleDirectory( - this->WorkingDirectory == cmOutputConverter::HOME_OUTPUT - ? this->GetBinaryDirectory() - : this->GetCurrentBinaryDirectory()); + std::string mod_dir = target->GetFortranModuleDirectory(); if (!mod_dir.empty()) { mod_dir = this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 862ea50..165f96c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -973,16 +973,12 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() *this->InfoFileStream << " )\n"; } - std::string const& working_dir = - this->LocalGenerator->GetCurrentBinaryDirectory(); - /* clang-format off */ *this->InfoFileStream << "\n" << "# Fortran module output directory.\n" << "set(CMAKE_Fortran_TARGET_MODULE_DIR \"" - << this->GeneratorTarget->GetFortranModuleDirectory(working_dir) - << "\")\n"; + << this->GeneratorTarget->GetFortranModuleDirectory() << "\")\n"; /* clang-format on */ // and now write the rule to use it ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 22 +++++----------------- Source/cmGeneratorTarget.h | 5 ++--- Source/cmLocalCommonGenerator.cxx | 5 +---- Source/cmMakefileTargetGenerator.cxx | 6 +----- 4 files changed, 9 insertions(+), 29 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits