diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 1fcf32f4a4..417607741c 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -195,7 +195,7 @@ syn keyword cmakeProperty contained \ FOLDER \ FRAMEWORK \ FRAMEWORK_VERSION - \ Fortran_BUILDING_INSTRINSIC_MODULES + \ Fortran_BUILDING_INTRINSIC_MODULES \ Fortran_FORMAT \ Fortran_MODULE_DIRECTORY \ Fortran_PREPROCESS diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index bd0820311f..48e762d704 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -226,7 +226,7 @@ Properties on Targets /prop_tgt/EXPORT_NO_SYSTEM /prop_tgt/EXPORT_PROPERTIES /prop_tgt/FOLDER - /prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES + /prop_tgt/Fortran_BUILDING_INTRINSIC_MODULES /prop_tgt/Fortran_FORMAT /prop_tgt/Fortran_MODULE_DIRECTORY /prop_tgt/Fortran_PREPROCESS @@ -661,6 +661,7 @@ Deprecated Properties on Targets :maxdepth: 1 /prop_tgt/COMPILE_DEFINITIONS_CONFIG + /prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES /prop_tgt/IMPORTED_NO_SYSTEM /prop_tgt/IOS_INSTALL_COMBINED /prop_tgt/POST_INSTALL_SCRIPT diff --git a/Help/prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES.rst b/Help/prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES.rst index 3533ef9c8f..5f03dcc1ee 100644 --- a/Help/prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES.rst +++ b/Help/prop_tgt/Fortran_BUILDING_INSTRINSIC_MODULES.rst @@ -1,16 +1,11 @@ Fortran_BUILDING_INSTRINSIC_MODULES ----------------------------------- +.. deprecated:: 3.32 + + Please use the :prop_tgt:`Fortran_BUILDING_INTRINSIC_MODULES` instead. + .. versionadded:: 3.22 -Instructs the CMake Fortran preprocessor that the target is building -Fortran intrinsics for building a Fortran compiler. - -This property is off by default and should be turned only on projects -that build a Fortran compiler. It should not be turned on for projects -that use a Fortran compiler. - -Turning this property on will correctly add dependencies for building -Fortran intrinsic modules whereas turning the property off will ignore -Fortran intrinsic modules in the dependency graph as they are supplied -by the compiler itself. +A misspelled variant of the :prop_tgt:`Fortran_BUILDING_INTRINSIC_MODULES` +target property. diff --git a/Help/prop_tgt/Fortran_BUILDING_INTRINSIC_MODULES.rst b/Help/prop_tgt/Fortran_BUILDING_INTRINSIC_MODULES.rst new file mode 100644 index 0000000000..149f728b96 --- /dev/null +++ b/Help/prop_tgt/Fortran_BUILDING_INTRINSIC_MODULES.rst @@ -0,0 +1,16 @@ +Fortran_BUILDING_INTRINSIC_MODULES +---------------------------------- + +.. versionadded:: 3.32 + +Instructs the CMake Fortran preprocessor that the target is building +Fortran intrinsics for building a Fortran compiler. + +This property is off by default and should be turned only on projects +that build a Fortran compiler. It should not be turned on for projects +that use a Fortran compiler. + +Turning this property on will correctly add dependencies for building +Fortran intrinsic modules whereas turning the property off will ignore +Fortran intrinsic modules in the dependency graph as they are supplied +by the compiler itself. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index b23dabdead..a5db6c864c 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -166,7 +166,11 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, mod_dir = this->LocalGenerator->GetCurrentBinaryDirectory(); } + // ATTENTION Before 3.32 the property name was misspelled. + // Check the correct name first and than the old name. bool building_intrinsics = + !mf->GetSafeDefinition("CMAKE_Fortran_TARGET_BUILDING_INTRINSIC_MODULES") + .empty() || !mf->GetSafeDefinition("CMAKE_Fortran_TARGET_BUILDING_INSTRINSIC_MODULES") .empty(); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7eb23bd94d..20d32eb74f 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4043,8 +4043,13 @@ std::string cmGeneratorTarget::GetFortranModuleDirectory( return this->FortranModuleDirectory; } -bool cmGeneratorTarget::IsFortranBuildingInstrinsicModules() const +bool cmGeneratorTarget::IsFortranBuildingIntrinsicModules() const { + // ATTENTION Before 3.32 the property name was misspelled. + // Check the correct name first and than the old name. + if (cmValue prop = this->GetProperty("Fortran_BUILDING_INTRINSIC_MODULES")) { + return prop.IsOn(); + } if (cmValue prop = this->GetProperty("Fortran_BUILDING_INSTRINSIC_MODULES")) { return prop.IsOn(); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index d5a3f98773..8379d5d55f 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -1066,7 +1066,7 @@ public: std::string const& config) const; std::string GetFortranModuleDirectory(std::string const& working_dir) const; - bool IsFortranBuildingInstrinsicModules() const; + bool IsFortranBuildingIntrinsicModules() const; bool IsLinkLookupScope(std::string const& n, cmLocalGenerator const*& lg) const; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index aec690eea4..8098d7021a 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1498,11 +1498,11 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() << this->GeneratorTarget->GetFortranModuleDirectory(working_dir) << "\")\n"; - if (this->GeneratorTarget->IsFortranBuildingInstrinsicModules()) { + if (this->GeneratorTarget->IsFortranBuildingIntrinsicModules()) { *this->InfoFileStream << "\n" << "# Fortran compiler is building intrinsic modules.\n" - << "set(CMAKE_Fortran_TARGET_BUILDING_INSTRINSIC_MODULES ON) \n"; + << "set(CMAKE_Fortran_TARGET_BUILDING_INTRINSIC_MODULES ON) \n"; } /* clang-format on */