Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
id: build
uses: astrorama/actions/elements-build-rpm@v3.5
- name: Upload RPM to repository
uses: astrorama/actions/upload-rpm@v3.4
uses: astrorama/actions/upload-rpm@feature/move_to_astromatic
if: ${{ github.repository_owner == 'astrorama' }}
env:
REPOSITORY_USER: ${{ secrets.REPOSITORY_USER }}
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]


## [6.3.7] - 2026-06-16

### Fixed
- Fix the backward compatibility with interface variable for CMake version
before 3.19.


## [6.3.6] - 2026-04-29

### Removed
- Remove unused boost::filesystem includes and is_regular usage from tests
- Clean up redundant includes in Auxiliary, Configuration, and Path tests
- Remove unused is_regular and is_regular_file checks
- Simplify boost::filesystem usage to only required functions
- Improve code clarity and maintainability in test files


## [6.3.5] - 2025-12-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_package(ElementsProject)
include(ElementsDefaults)

# Declare project name and version
elements_project(Elements 6.3.6 DESCRIPTION "A C++ base framework for the Euclid Software.")
elements_project(Elements 6.3.7 DESCRIPTION "A C++ base framework for the Euclid Software.")

# This test does not really fit in a subdirectory.

Expand Down
67 changes: 52 additions & 15 deletions cmake/ElementsProjectConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,11 @@ macro(_get_include_dir_from_package inc_dir pck)

set(${inc_dir})
if(TARGET ${pck})
get_target_property(${inc_dir} ${pck} INTERFACE_SOURCE_DIR)
if(CMAKE_VERSION VERSION_LESS 3.19)
get_target_property(${inc_dir} ${pck} INTERFACE_SOURCE_DIR)
else()
get_target_property(${inc_dir} ${pck} SOURCE_DIR)
endif()
elseif(IS_ABSOLUTE ${pck} AND IS_DIRECTORY ${pck})
set(${inc_dir} ${pck})
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${pck})
Expand Down Expand Up @@ -1913,7 +1917,11 @@ function(print_package_directories)
foreach(package ${ARGN})
# we need to ensure that the user can call this function also for directories
if(TARGET ${package})
get_target_property(to_incl ${package} INTERFACE_SOURCE_DIR)
if(CMAKE_VERSION VERSION_LESS 3.19)
get_target_property(${inc_dir} ${pck} INTERFACE_SOURCE_DIR)
else()
get_target_property(to_incl ${package} SOURCE_DIR)
endif()
if(to_incl)
message(STATUS "print_package_directories1 include_directories(${to_incl})")
endif()
Expand Down Expand Up @@ -2203,15 +2211,19 @@ endfunction()
# elements_add_library
#-------------------------------------------------------------------------------
function(elements_resolve_link_libraries variable)
# message(STATUS "elements_resolve_link_libraries input: ${ARGN}")
#message(STATUS "elements_resolve_link_libraries input: ${ARGN}")
set(collected)
set(to_be_resolved)
foreach(package ${ARGN})
# check if it is an actual library or a target first
if(TARGET ${package})
#message(STATUS "${package} is a TARGET")
set(collected ${collected} ${package})
get_target_property(libs ${package} INTERFACE_REQUIRED_LIBRARIES)
if(CMAKE_VERSION VERSION_LESS 3.19)
get_target_property(libs ${package} INTERFACE_REQUIRED_LIBRARIES)
else()
get_target_property(libs ${package} REQUIRED_LIBRARIES)
endif()
if(libs)
set(to_be_resolved ${to_be_resolved} ${libs})
endif()
Expand Down Expand Up @@ -2332,7 +2344,11 @@ function(elements_get_required_include_dirs output)
set(req)
if(TARGET ${lib})
list(APPEND collected ${lib})
get_property(req TARGET ${lib} PROPERTY INTERFACE_REQUIRED_INCLUDE_DIRS)
if(CMAKE_VERSION VERSION_LESS 3.19)
get_property(req TARGET ${lib} PROPERTY INTERFACE_REQUIRED_INCLUDE_DIRS)
else()
get_property(req TARGET ${lib} PROPERTY REQUIRED_INCLUDE_DIRS)
endif()
if(req)
list(APPEND collected ${req})
endif()
Expand Down Expand Up @@ -2582,10 +2598,21 @@ Provide source files and the NO_PUBLIC_HEADERS option for a plugin/module librar
_elements_detach_debinfo(${library})

# Declare that the used headers are needed by the libraries linked against this one
set_target_properties(${library} PROPERTIES
INTERFACE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
INTERFACE_REQUIRED_INCLUDE_DIRS "${ARG_INCLUDE_DIRS}"
INTERFACE_REQUIRED_LIBRARIES "${ARG_LINK_LIBRARIES}")

if(CMAKE_VERSION VERSION_LESS 3.19)
set_target_properties(${library} PROPERTIES
INTERFACE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
INTERFACE_REQUIRED_INCLUDE_DIRS "${ARG_INCLUDE_DIRS}"
INTERFACE_REQUIRED_LIBRARIES "${ARG_LINK_LIBRARIES}"
)
else()
set_target_properties(${library} PROPERTIES
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
REQUIRED_INCLUDE_DIRS "${ARG_INCLUDE_DIRS}"
REQUIRED_LIBRARIES "${ARG_LINK_LIBRARIES}"
)
endif()

set_property(GLOBAL APPEND PROPERTY LINKER_LIBRARIES ${library})

if(USE_VERSIONED_LIBRARIES)
Expand Down Expand Up @@ -4615,12 +4642,22 @@ link_directories(AFTER \${_IMPORT_PREFIX}/${lib_install_suff})
file(APPEND ${pkg_exp_file} "add_library(${library} SHARED IMPORTED)\n")
file(APPEND ${pkg_exp_file} "set_target_properties(${library} PROPERTIES\n")

foreach(pn INTERFACE_REQUIRED_INCLUDE_DIRS INTERFACE_REQUIRED_LIBRARIES)
get_property(prop TARGET ${library} PROPERTY ${pn})
if (prop)
file(APPEND ${pkg_exp_file} " ${pn} \"${prop}\"\n")
endif()
endforeach()
if(CMAKE_VERSION VERSION_LESS 3.19)
foreach(pn INTERFACE_REQUIRED_INCLUDE_DIRS INTERFACE_REQUIRED_LIBRARIES)
get_property(prop TARGET ${library} PROPERTY ${pn})
if (prop)
file(APPEND ${pkg_exp_file} " ${pn} \"${prop}\"\n")
endif()
endforeach()
else()
foreach(pn REQUIRED_INCLUDE_DIRS REQUIRED_LIBRARIES)
get_property(prop TARGET ${library} PROPERTY ${pn})
if (prop)
file(APPEND ${pkg_exp_file} " ${pn} \"${prop}\"\n")
endif()
endforeach()
endif()


if(NOT CMAKE_VERSION VERSION_LESS 3.9.0)
# set(prop $<TARGET_FILE:${library}>)
Expand Down
Loading