diff options
author | Brad King <brad.king@kitware.com> | 2023-11-27 13:36:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-11-27 13:36:45 (GMT) |
commit | c2bd158712b1ee3465296ee6be369f49747d709d (patch) | |
tree | eb694c8b3d5669ead72001ea09c8e30c53c1e717 /Source/cmMakefileTargetGenerator.cxx | |
parent | 89cfb90b9c0893133983b4f25896671c4f07497c (diff) | |
parent | beb1393f8f29302197b80741bec41a13b7f207c7 (diff) | |
download | CMake-c2bd158712b1ee3465296ee6be369f49747d709d.zip CMake-c2bd158712b1ee3465296ee6be369f49747d709d.tar.gz CMake-c2bd158712b1ee3465296ee6be369f49747d709d.tar.bz2 |
Merge topic 'fortran-objects-as-sources-fix'
beb1393f8f Merge branch 'revert-exact-collation-depends-3.27' into fortran-objects-as-sources-fix
a033dce326 Makefiles: provide, but do not consume, "forward linked" target dirs
7cd0adab1b cmCommonTargetGenerator: use modules from linked object-referenced targets
1175f1c874 LinkItem: track `cmSourceFile` instances for external objects
d2fa56772f Ninja: support "forwarding" modules from other targets
ec1e589bec Ninja: Revert exact collation dependencies for 3.27
06df59b930 cmCommonTargetGenerator: return forward linked target dirs too
f8729ab366 cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8989
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 343f6b8..8fda774 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1442,9 +1442,20 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() "# Targets to which this target links which contain Fortran sources.\n" "set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES\n"; /* clang-format on */ - std::vector<std::string> const dirs = + auto const dirs = this->GetLinkedTargetDirectories("Fortran", this->GetConfigName()); - for (std::string const& d : dirs) { + for (std::string const& d : dirs.Direct) { + *this->InfoFileStream << " \"" << d << "/DependInfo.cmake\"\n"; + } + *this->InfoFileStream << " )\n"; + + /* clang-format off */ + *this->InfoFileStream + << "\n" + "# Targets to which this target links which contain Fortran sources.\n" + "set(CMAKE_Fortran_TARGET_FORWARD_LINKED_INFO_FILES\n"; + /* clang-format on */ + for (std::string const& d : dirs.Forward) { *this->InfoFileStream << " \"" << d << "/DependInfo.cmake\"\n"; } *this->InfoFileStream << " )\n"; |