lanl / spiner

Performance portable routines for generic, tabulated, multi-dimensional data
https://lanl.github.io/spiner
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Move build system to cmake #14

Closed Yurlungur closed 2 years ago

Yurlungur commented 2 years ago

PR Summary

In this PR, I move the build system to cmake. I do so mainly to make spiner more consistent with, e.g., the best-practices we've built up in singularity-eos. In practice, this means the following changes:

My hope is this will make it easier to integrate spiner with spack, with our CI, and with the singularity-eos build system we've constructed. That said, I could be wrong on this. I was disappointed to find that the new CMakeLists.txt are like 3x times more lines than the old Makefiles, which makes me wonder. It's also a breaking change with downstream, since the directory structure changed. (Of course, the downstream fixes should be straightforward.)

Due to my uncertainty, I've marked this as WIP until I can get input from stakeholders, in particular, I'm hoping to hear from at least a few of:

Please take a look and let me know what you think.

PR Checklist

Yurlungur commented 2 years ago

Another consideration: My current draft does not support "in-tree" Kokkos builds of the spiner tests. However, if Kokkos is being built in-tree in a larger project, then that still works. Is there a desire to support "in-tree" builds for the tests?

Yurlungur commented 2 years ago

I also took this as an opportunity to invite @jhp-lanl and @mauneyc-LANL to the repo.

Yurlungur commented 2 years ago

Another suggestion by @mauneyc-LANL : Add a spiner::spiner target, which includes the spiner::flags and spiner::libs targets.

Yurlungur commented 2 years ago

With @mauneyc-LANL 's suggestions, I'm removing the WIP. I will merge once I've implemented them, if I don't hear from anyone else.

Yurlungur commented 2 years ago

With two approvals and tests passing, I'm going to merge this. That said, @dholladay00 I am interested in your thoughts. If you get the chance to look, let me know what you think.

dholladay00 commented 2 years ago

took a brief look and everything looked ok to me. currently do we install this (when installing singularity-eos) just by copying headers, did you test if installation behavior needed to change @Yurlungur ?

Yurlungur commented 2 years ago

took a brief look and everything looked ok to me. currently do we install this (when installing singularity-eos) just by copying headers, did you test if installation behavior needed to change @Yurlungur ?

Thanks, @dholladay00 ! In singularity-eos, yes, all we do is copy the headers. I didn't change the cmake build system for singularity-eos to reflect the changes in spiner. What will need to change is we'll need to add spiner as a subdirectory, but then things should just work (I hope).