From 2c6d0e29cd8b273ace9ffbe28bb0a3dd0c8ab77a Mon Sep 17 00:00:00 2001 From: Jules Kouatchou Date: Wed, 10 Jul 2024 19:55:34 -0400 Subject: [PATCH 1/2] Update the file esma_add_fortran_submodules.cmake to handele several levels of subdirectories. --- CHANGELOG.md | 6 ++++++ esma_support/esma_add_fortran_submodules.cmake | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0063aa6..5a6cb88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.1.0] - 2024-06-21 +### Fixed + +- Add more features to the file `esma_add_fortran_submodules.cmake` so that the function `esma_add_fortran_submodules` can handle several level of subdirectories. + +## [4.1.0] - 2024-06-21 + ### Added - Add the file `esma_add_fortran_submodules.cmake` in the `esma_support` folder. The file contains a function that prevents conflicts when several submodule files have the same name. diff --git a/esma_support/esma_add_fortran_submodules.cmake b/esma_support/esma_add_fortran_submodules.cmake index 7da31b1..108e568 100644 --- a/esma_support/esma_add_fortran_submodules.cmake +++ b/esma_support/esma_add_fortran_submodules.cmake @@ -14,14 +14,20 @@ function(esma_add_fortran_submodules) set(input ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SUBDIRECTORY}/${file}) set(output ${CMAKE_CURRENT_BINARY_DIR}/${ARG_SUBDIRECTORY}_${file}) + set(esma_internal "esma_internal_${ARG_SUBDIRECTORY}_${file}") + add_custom_command( OUTPUT ${output} COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output} DEPENDS ${input} ) - set_property(SOURCE ${output} PROPERTY GENERATED 1) + add_custom_target(${esma_internal} DEPENDS ${output}) + + set_property(SOURCE ${output} TARGET_DIRECTORY ${ARG_TARGET} PROPERTY GENERATED 1) + add_dependencies(${ARG_TARGET} ${esma_internal}) target_sources(${ARG_TARGET} PRIVATE ${output}) endforeach() endfunction() + From 994046122b7ba2ed271e5b125f4be968af504824 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 11 Jul 2024 11:49:28 -0400 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6cb88..34ff79b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [4.1.0] - 2024-06-21 +## [4.2.0] - 2024-07-11 ### Fixed