Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitFlow: Merge develop into main for release #386

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [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.

## [4.0.1] - 2024-06-14

### Fixed
Expand Down
27 changes: 27 additions & 0 deletions esma_support/esma_add_fortran_submodules.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Function to avoid conflicts with files (in separate folders) with the same name.
# The function is necessary for submodule files.

function(esma_add_fortran_submodules)
set(options)
set(oneValueArgs TARGET SUBDIRECTORY)
set(multiValueArgs SOURCES)
cmake_parse_arguments(
ARG "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN}
)

foreach(file ${ARG_SOURCES})

set(input ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SUBDIRECTORY}/${file})
set(output ${CMAKE_CURRENT_BINARY_DIR}/${ARG_SUBDIRECTORY}_${file})
add_custom_command(
OUTPUT ${output}
COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output}
DEPENDS ${input}
)
set_property(SOURCE ${output} PROPERTY GENERATED 1)
target_sources(${ARG_TARGET} PRIVATE ${output})

endforeach()

endfunction()
1 change: 1 addition & 0 deletions esma_support/esma_support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include (esma_add_library)
include (esma_generate_automatic_code)
include (esma_create_stub_component)
include (esma_fortran_generator_list)
include (esma_add_fortran_submodules)

# Testing
include (esma_enable_tests)
Loading