libint
libint copied to clipboard
full cmake 7/N: library
currently atop #315 . new base lib in ee93781
- [x] build the export tarball. uses either gzip or bzip2 (closes #316 ). largely imitates the libtool tarball -- see differences below, mainly in positioning of fortran files
>>> diff ../libint2-upstream-wip/tarball_contents_281_full tarball_contents_current10 | grep ">"
> libint-2.8.1/include/libint2/config2.h.cmake.in
> libint-2.8.1/include/libint2/config.h
> libint-2.8.1/cmake/modules/FindMultiprecision.cmake
> libint-2.8.1/cmake/modules/autocmake_safeguards.cmake
> libint-2.8.1/cmake/modules/int_orderings.cmake
> libint-2.8.1/cmake/modules/int_computed.cmake
> libint-2.8.1/cmake/modules/FindEigen3.cmake
> libint-2.8.1/cmake/modules/int_userreal.cmake
> libint-2.8.1/cmake/modules/options.cmake
> libint-2.8.1/cmake/modules/int_checkboost.cmake
> libint-2.8.1/features
> libint-2.8.1/tests/CMakeLists.txt
> libint-2.8.1/tests/fortran/
> libint-2.8.1/tests/fortran/test-eri.cc
> libint-2.8.1/tests/fortran/test.cc
> libint-2.8.1/tests/fortran/fortran_example.F90
> libint-2.8.1/tests/hartree-fock/hftest.cmake
>>> diff ../libint2-upstream-wip/tarball_contents_281_full tarball_contents_current10 | grep "<"
< libint-2.8.1/include/libint2/config.h.in
< libint-2.8.1/include/CMakeLists.txt
< libint-2.8.1/compiler.config
< libint-2.8.1/cmake/hftest.cmake
< libint-2.8.1/cmake/modules/RedefaultableOption.cmake
< libint-2.8.1/cmake/modules/FindMPFR.cmake
< libint-2.8.1/cmake/modules/JoinPaths.cmake
< libint-2.8.1/cmake/libint2.pc.cmake.in
< libint-2.8.1/MakeVars.features
< libint-2.8.1/fortran/test-eri.cc
< libint-2.8.1/fortran/test.cc
< libint-2.8.1/fortran/fortran_example.F90
- [x] GHA run with a variety of shared/static, release/debug, subproject=on/off . steps are broken up more to detect failures earlier, and tests are run with a bit of parallelism. The export job of GHA is reenabled.
- [x] build base library (shared & static) and header-only cxx intf (linked to shared & static). Controlled through
BUILD_SHARED_LIBSandLIBINT2_BUILD_SHARED_AND_STATIC_LIBSfor both.- [x] generating ints into a new dir
generated/rather than directly insrc/so that not removing headers from the dir once generated. I suspect that since all lib builds going through the tarball that__COMPILING_LIBINTcould be removed after editing the export structure. - [x] all targets assembled in order
- [x] generating ints into a new dir
+ target_compile_features(
+ target_compile_definitions(
+ target_compile_options(
+ set_target_properties( # note cmake generator expressions not allowed for this cmd
+ target_include_directories(
+ target_link_libraries(
- [x] enable fortran
- [x] enable python
- [x] fixed #319
- [x] linking to header-only cxx rather than to base object library + eigen
- [x] added a linux-style install-to-prefix for packagers
- [x] python module not built by default even if python enabled
- [x] enable compiled cxx library
- [x] I finally succeeded in making the compiled cxx lib link to something, namely tests!
- [x] lib unit tests and the hartree-fock (plain) and the fortran cxx tests currently use compiled when available and header-only when not, rather than duplicating the whole test suite.
- [x] I had to add in an extra define for the tests to allow it to compile. Is this right in general?
- [x] linking the compiled cxx to the hartree-fock++ test on my local Linux box (conda gcc12) always works, but on GHA, it succeeds with Linux+conda-gcc and fails with Linux+ubuntu-gcc10 or mac or windows or intel). See #239
- [x] the compiled library had only ever been in #233, never released. It is controlled by the following, which I'm toggling to off by default
LIBINT2_REQUIRE_CXX_API_COMPILED=OFF
- [x] all the optional what-to-build features standardized to
LIBINT2_ENABLE_prefixes sinceENABLE_PYTHONis pretty generic and prone to conflicts with FetchContent. - [x] Updated DynamicVersion from upstream ... see a choice at https://github.com/LecrisUT/CMakeExtraUtils/issues/24#issuecomment-1892851236
- [x] changed some
//comments in ifdefs to/* ... */since the former were raising warnings with some compilers - [ ] stuff that doesn't work
- [ ] mac dylib with fortran #318
- [ ] mpfr -- I haven't gotten the lib unit tests to compile with
LIBINT_HAS_MPFR=1 - [ ] c++ compiled lib for hartree-fock++ (see above)