AstroAccelerateOrg / astro-accelerate

AstroAccelerate is a many-core accelerated software package for processing time-domain radio-astronomy data.
https://www.oerc.ox.ac.uk/research-groups/astroaccelerate/
GNU General Public License v3.0
42 stars 16 forks source link

Updates to CMakelists.txt to export target and create pkg-config file, adding meson build file #271

Closed telegraphic closed 1 year ago

telegraphic commented 1 year ago

Description of pull request

This PR is an update to CMakelists.txt to make it easier to use astro-accelerate as a dependency.

When make install is run:

I also added some lines to quash cmake policy warnings that were popping up.

Interfaces Will this pull request result in a backwards-incompatible interface change: no

Expected semantic version number increment category (Please indicate x.y.z): 1.3.2

Notes

This PR was motivated by my plan to make some utilities (plugins for bifrost) using astro-accelerate. Thought I should to share in case others could benefit. I want to use meson as a build tool -- I don't really know what I'm doing with cmake so my changes may not be the canonical approach!

telegraphic commented 1 year ago

Update: I have now added a meson.build file, so the project can be built with meson as well

telegraphic commented 1 year ago

thanks again @eli-schwartz!

telegraphic commented 1 year ago

TODO: Add generation of aa_version.hpp via Meson.

telegraphic commented 1 year ago

DONE: need to change

-join_paths(lib\pkgconfig "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
+join_paths(CMAKE_INSTALL_LIBDIR "lib/pkgconfig" "${prefix}")

and need to add

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(JoinPaths)
KAdamek commented 1 year ago

Thanks for updating Cmake.