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 7/N: library #317

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

full cmake 7/N: library #317

wants to merge 21 commits into from

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Jan 6, 2024

currently atop #315 . new base lib in ee93781

>>> 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
  • 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.
  • build base library (shared & static) and header-only cxx intf (linked to shared & static). Controlled through BUILD_SHARED_LIBS and LIBINT2_BUILD_SHARED_AND_STATIC_LIBS for both.
    • generating ints into a new dir generated/ rather than directly in src/ so that not removing headers from the dir once generated. I suspect that since all lib builds going through the tarball that __COMPILING_LIBINT could be removed after editing the export structure.
    • all targets assembled in order
+    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(
  • enable fortran
  • enable python
    • fixed fix CI for setuptools=69 #319
    • linking to header-only cxx rather than to base object library + eigen
    • added a linux-style install-to-prefix for packagers
    • python module not built by default even if python enabled
  • enable compiled cxx library
    • I finally succeeded in making the compiled cxx lib link to something, namely tests!
    • 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.
    • I had to add in an extra define for the tests to allow it to compile. Is this right in general?
    • 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 status of compiled c++11 interface #239
    • the compiled library had only ever been in new cmake harness, round 3 #233, never released. It is controlled by the following, which I'm toggling to off by default LIBINT2_REQUIRE_CXX_API_COMPILED=OFF
  • all the optional what-to-build features standardized to LIBINT2_ENABLE_ prefixes since ENABLE_PYTHON is pretty generic and prone to conflicts with FetchContent.
  • Updated DynamicVersion from upstream ... see a choice at Generating full_version LecrisUT/CMakeExtraUtils#24 (comment)
  • changed some // comments in ifdefs to /* ... */ since the former were raising warnings with some compilers
  • stuff that doesn't work
    • mac dylib with fortran mac+shared+fortran broken #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)

@loriab loriab changed the title full cmake 7/N: library/export full cmake 7/N: library Jan 10, 2024
take 2

take 3

c++ ho testing

take 2

try 3

take 4

take 5

take 6

take 7

take 8

take 8

take 9

fortran

try 2

try 3

try 4

try 5

python

try 2

try 3

try 4

try 5

try 6

try 7

try 8

try 9

try 10

try 11

try 12

try 13

try 14

try 15

try 16

try 17

helps to spell var correctly

try 18

try 19

try 20

try 21

try 22

try 22

try 24
@loriab loriab marked this pull request as ready for review January 16, 2024 03:20
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.

use bzip2 for exported libraries to save space
1 participant