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

full cmake 5/N: prerequisites #314

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

full cmake 5/N: prerequisites #314

wants to merge 17 commits into from

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Dec 25, 2023

currently atop #313 . diff of the new stuff: loriab/libint@configconfig...loriab:libint:l2deps

  • handle gmp/mpfr, boost, eigen, python deps
  • fetchcontent-advocating ppl have convinced me that L2-only library options should probably start with LIBINT2_. And if options add functionality, I've added ENABLE. All changes documented in the upgrade guide.
  • gmp/mpfr
    • (copied from 2022 PR) rename FindMPFR.cmake to FindMultiprecision.cmake to handle gmp, gmpxx, and mpfr targets. Based on offical cmake module FindGSL.cmake to hopefully handle Windows, too. This way build_libint seeks gmpxx component, and the library (if mprfr enabled) seeks gmpxx and mpfr.
  • Boost
    • I think I saw some Boost >=1.29. I switched everything to minimum 1.57 (c.2014)
    • The Boost handling logic is simplified some. Your try_compile() sample code is tucked away in a cmake include. The specialty USE_BUNDLED_BOOST is replaced by the standard DISABLE_FIND_PACKAGE_Boost. If the sample code fails on a detected Boost, the build stops, rather than continuing to the bundled boost.
  • Eigen
    • (copied from 2022 PR) reworked Eigen3 detection. copied a FindEigen3.cmake from latest Eigen release. This is installed with L2 and the local path is prepended so this FindEigen3 is always used. The FindEigen already handles (1) finding installations with a Eigen3Config.cmake, (2) seeking if the Eigen3_INCLUDE_DIR already in cache, (3) searching for header like a traditional FindPkg.cmake. It always returns a target, Eigen3::Eigen. This has been modified to address some of your concerns. (1) turned off build package registry to avoid the ephemeral build trees. (2) If an option LIBINT_LOCAL_Eigen3_FIND is set, the FindEigen instead looks to import a local L2-defined target (see below) to ensure ABI consistency. This is off by default. The FindEigen3 detection is shared by the library build and libint2-config.cmake
    • (copied from 2022 PR) Eigen3 handling on the src/lib/libint/CM.export side is outsourced to FindEigen3. If LIBINT_LOCAL_Eigen3_INSTALL is set, the detected eigen3 is installed as a target in a separate file. This is off by default, but I don't care if it's on by default, so long as it's turn-off-able and the _FIND option is off by default.
    • As far as I can see, Eigen is irrelevant to the generator/compiler, so I didn't detect and include it for config.h. I figured it was there for libtool access.
    • There's an eigen test code in lib/autoconf/acx_check_eigen.m4 . Do you want that run on the cmake-detected eigen?
  • Python
    • Dependency pattern unchanged and already added Fall 2023.

@loriab loriab marked this pull request as ready for review December 25, 2023 20:31
@loriab loriab mentioned this pull request Dec 28, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant