diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-09-18 23:59:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-20 13:14:58 (GMT) |
commit | 978b68d3bbb44e3bc6adbe5109eb8295f8232ce6 (patch) | |
tree | ce2024d7bca4816b4ef41672c3067e48bd0660ac /Source | |
parent | 619aca80ae94b909085344af1098c7f4bf80f0c2 (diff) | |
download | CMake-978b68d3bbb44e3bc6adbe5109eb8295f8232ce6.zip CMake-978b68d3bbb44e3bc6adbe5109eb8295f8232ce6.tar.gz CMake-978b68d3bbb44e3bc6adbe5109eb8295f8232ce6.tar.bz2 |
add_custom_target: Fix regression with Fortran sources
Since commit 74b1d6caf3 (cmComputeLinkInformation: compute link info for
module-using targets, 2023-09-05, v3.27.5~7^2) we accidentally try to
compute link information for custom targets if they have Fortran
sources. For module dependencies, we only need to consider target types
that can compile.
Fixes: #25252
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 4804565..7d3675e 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -539,8 +539,9 @@ bool cmComputeLinkInformation::Compute() this->Target->GetType() == cmStateEnums::SHARED_LIBRARY || this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || - this->Target->HaveCxx20ModuleSources() || - this->Target->HaveFortranSources())) { + (this->Target->CanCompileSources() && + (this->Target->HaveCxx20ModuleSources() || + this->Target->HaveFortranSources())))) { return false; } |