Skip to content

Each component can now be built and installed separately

Pradipta Samanta requested to merge k202170-add-cmake-components into main

What is the new feature

The implementation allowed for separate building and installation of all the components, enhancing efficiency and modularity

How is it implemented

Created separate target files for individual components; also added new CMake options to enable the building of individual components.

Fixed an issue with the 'libiconmath' package not being found in another program when it is installed in a custom prefix directory.

Additionally, two more major changes were made:

  • In this commit, I used different directories to install the mod files of different components of iconmath. The motivation behind the change was that I found a code that uses a module from iconmath::horizontal compiles fine even though that component is not linked using target_link_libraries.
  • In this commit, I changed the way target files of individual components are included when a new project tries to find iconmath. Before, the inclusions of components interpolation and horizontal were done depending on their presence in the proper place. But, because of this, it was possible to use target_link_libraries(new-project PRIVATE iconmath::horizontal) successfully even when iconmath was found using find_package(iconmath CONFIG REQUIRED COMPONENTS interpolation). This should always give an error, which was not the case before these changes were made.

Mandatory steps before review

  • Gitlab CI passes (Hint: use make format for linting)
  • New feature is covered by additional unit tests
  • Mark the merge request as ready by removing Draft:

Mandatory steps before merge

  • Reviewed by a maintainer
  • Incorporate review suggestions
  • Prior to merging, please remove any boilerplate from the MR description, retaining only the Please describe your feature in a couple of words and describe important implementation details of the feature section to maintain

You are not supposed to merge this request by yourself, the maintainers of libiconmath take care of this action!

Edited by Pradipta Samanta

Merge request reports

Loading