From c167357a3bc3463b24a27817e563859897c4b94c Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 30 Apr 2025 11:39:36 -0400 Subject: [PATCH 1/3] feat(pybind11): added infra to compile with pybind11 --- build-config/pybind/meson.build | 0 subprojects/pybind11.wrap | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 build-config/pybind/meson.build create mode 100644 subprojects/pybind11.wrap diff --git a/build-config/pybind/meson.build b/build-config/pybind/meson.build new file mode 100644 index 00000000..e69de29b diff --git a/subprojects/pybind11.wrap b/subprojects/pybind11.wrap new file mode 100644 index 00000000..b4024bbf --- /dev/null +++ b/subprojects/pybind11.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = pybind11-2.13.5 +source_url = https://github.com/pybind/pybind11/archive/refs/tags/v2.13.5.tar.gz +source_filename = pybind11-2.13.5.tar.gz +source_hash = b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252 +patch_filename = pybind11_2.13.5-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/pybind11_2.13.5-1/get_patch +patch_hash = ecb031b830481560b3d8487ed63ba4f5509a074be42f5d19af64d844c795e15b +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pybind11_2.13.5-1/pybind11-2.13.5.tar.gz +wrapdb_version = 2.13.5-1 + +[provide] +pybind11 = pybind11_dep From 394622df4752dad7453a7286e3ccaffa60e8bdc6 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 30 Apr 2025 11:41:10 -0400 Subject: [PATCH 2/3] feat(python-composition): added composition module interface --- assets/static/atomic/include/atomicSpecies.h | 4 +--- build-config/pybind/meson.build | 5 +++++ build-config/quill/meson.build | 11 ++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/static/atomic/include/atomicSpecies.h b/assets/static/atomic/include/atomicSpecies.h index 64c6596a..be265b39 100644 --- a/assets/static/atomic/include/atomicSpecies.h +++ b/assets/static/atomic/include/atomicSpecies.h @@ -1,5 +1,4 @@ -#ifndef SPECIES_MASS_DATA_H -#define SPECIES_MASS_DATA_H +#pragma once #include #include #include @@ -7205,4 +7204,3 @@ namespace chemSpecies { {"Og-295", Og_295}, }; }; // namespace chemSpecies -#endif // SPECIES_MASS_DATA_H diff --git a/build-config/pybind/meson.build b/build-config/pybind/meson.build index e69de29b..94888e18 100644 --- a/build-config/pybind/meson.build +++ b/build-config/pybind/meson.build @@ -0,0 +1,5 @@ +if get_option('build_python') + pybind11_proj = subproject('pybind11') + pybind11_dep = pybind11_proj.get_variable('pybind11_dep') + python3_dep = dependency('python3') +endif \ No newline at end of file diff --git a/build-config/quill/meson.build b/build-config/quill/meson.build index 3c5a89d8..a069255e 100644 --- a/build-config/quill/meson.build +++ b/build-config/quill/meson.build @@ -1,5 +1,10 @@ +quill_cmake_options = cmake.subproject_options() +quill_cmake_options.add_cmake_defines({ + 'BUILD_SHARED_LIBS': 'ON', + 'CMAKE_SKIP_INSTALL_RULES': 'ON' +}) quill_sp = cmake.subproject( - 'quill' + 'quill', + options: quill_cmake_options, ) -quill_dep = quill_sp.dependency('quill') -add_project_arguments('-I' + meson.current_build_dir() + '/subprojects/quill/__CMake_build', language: 'cpp') \ No newline at end of file +quill_dep = quill_sp.dependency('quill') \ No newline at end of file From 93c9d5e8825f81ab3b034dd4460521f071e20a50 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 30 Apr 2025 11:44:53 -0400 Subject: [PATCH 3/3] build(meson): switched almost all intermediate targets to shared libraries --- src/network/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/meson.build b/src/network/meson.build index 2add6361..41abf3fe 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -19,7 +19,7 @@ dependencies = [ ] # Define the libnetwork library so it can be linked against by other parts of the build system -libnetwork = static_library('network', +libnetwork = library('network', network_sources, include_directories: include_directories('public'), dependencies: dependencies,