fix(wasm): propegate all build flags

This commit is contained in:
2025-12-03 11:27:01 -05:00
parent 2caf46c984
commit 979ec80dc4
8 changed files with 47 additions and 34 deletions

View File

@@ -1,4 +1,9 @@
composition_p = subproject('libcomposition', default_options: ['pkg-config=' + pkg_config_bool_str])
composition_p = subproject('libcomposition',
default_options: [
'pkg_config=' + get_option('pkg_config').to_string(),
'build_tests=' + get_option('build_tests').to_string(),
'build_examples=false'
])
comp_dep = composition_p.get_variable('composition_dep')
libcomposition = composition_p.get_variable('libcomposition')
spw_dep = composition_p.get_variable('species_weight_dep')
@@ -7,4 +12,4 @@ composition_dep = [
spw_dep,
]
alias_target('build-libcomposition', libcomposition)
alias_target('build-libcomposition', libcomposition)

View File

@@ -1,5 +1,10 @@
config_p = subproject('libconfig', default_options:['pkg-config=false'])
config_p = subproject('libconfig',
default_options:[
'pkg_config=' + get_option('pkg_config').to_string(),
'build_tests=' + get_option('build_tests').to_string(),
'build_examples=false'
])
config_dep = config_p.get_variable('config_dep')
libconfig = config_p.get_variable('libconfig')
alias_target('build-libconfig', libconfig)
alias_target('build-libconfig', libconfig)

View File

@@ -1,4 +1,8 @@
const_p = subproject('libconstants', default_options: ['pkg-config=' + pkg_config_bool_str])
const_p = subproject('libconstants', default_options: [
'pkg_config=' + get_option('pkg_config').to_string(),
'build_tests=' + get_option('build_tests').to_string(),
'build_examples=false'
])
const_dep = const_p.get_variable('const_dep')
libconst = const_p.get_variable('libconst')

View File

@@ -1,4 +1,8 @@
logging_p = subproject('liblogging', default_options: ['pkg-config=' + pkg_config_bool_str])
logging_p = subproject('liblogging', default_options: [
'pkg_config=' + get_option('pkg_config').to_string(),
'build_tests=' + get_option('build_tests').to_string(),
'build_examples=false'
])
liblogging = logging_p.get_variable('liblogging')
logging_dep = logging_p.get_variable('logging_dep')
@@ -6,4 +10,4 @@ quill_dep = logging_p.get_variable('quill_dep')
log_dep = [logging_dep, quill_dep]
alias_target('build-liblogging', liblogging)
alias_target('build-liblogging', liblogging)

View File

@@ -1,10 +1,10 @@
plugin_p = subproject('libplugin', default_options: [
'pkg-config=' + pkg_config_bool_str,
'build-tests=' + get_option('build-tests').to_string(),
'python-wheel=' + get_option('build-python').to_string(),
'pkg-config=' + get_option('pkg_config').to_string(),
'build-tests=' + get_option('build_tests').to_string(),
'python-wheel=' + get_option('build_python').to_string(),
])
libplugin = plugin_p.get_variable('libplugin')
plugin_dep = plugin_p.get_variable('plugin_dep')
alias_target('build-libplugin', libplugin)
alias_target('build-libplugin', libplugin)

View File

@@ -1,19 +1,19 @@
if get_option('build-lib-comp') or get_option('build-lib-all') or get_option('build-python')
if get_option('build_lib_comp') or get_option('build_lib_all') or get_option('build_python')
subdir('libcomposition')
endif
if get_option('build-lib-config') or get_option('build-lib-all') or get_option('build-python')
if get_option('build_lib_config') or get_option('build_lib_all') or get_option('build_python')
subdir('libconfig')
endif
if get_option('build-lib-const') or get_option('build-lib-all') or get_option('build-python')
if get_option('build_lib_const') or get_option('build_lib_all') or get_option('build_python')
subdir('libconstants')
endif
if get_option('build-lib-log') or get_option('build-lib-all')
if get_option('build_lib_log') or get_option('build_lib_all')
subdir('liblogging')
endif
if get_option('build-lib-plugin') or get_option('build-lib-all')
if get_option('build_lib_plugin') or get_option('build_lib_all')
subdir('libplugin')
endif
if get_option('build-python')
if get_option('build_python')
subdir('pybind')
endif

View File

@@ -1,18 +1,13 @@
project('fourdst', 'cpp', version: 'v0.9.12', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
project('fourdst', 'cpp', version: 'v0.9.13', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
add_project_arguments('-fvisibility=default', language: 'cpp')
pkg_config_bool_str = 'false'
if get_option('pkg-config')
pkg_config_bool_str = 'true'
endif
# Configure vendor libraries
subdir('build-config')
# Configure python bindings
if get_option('build-python')
if get_option('build_python')
subdir('build-python')
subdir('src-pybind')

View File

@@ -1,10 +1,10 @@
option('pkg-config', type: 'boolean', value: false, description: 'generate pkg-config file for all libraries and fourdst (defaults to false to allow easy pip building)')
option('electron-build-py-backend', type: 'boolean', value: false, description: 'use pyinstaller to build the python backend for the electron app')
option('build-tests', type: 'boolean', value: false, description: 'compile subproject tests')
option('build-lib-all', type: 'boolean', value: true, description: 'build the full fourdst library with all features enabled')
option('build-lib-comp', type: 'boolean', value: false, description: 'build the minimal fourdst library with only compression and decompression features enabled')
option('build-lib-config', type: 'boolean', value: false, description: 'build the fourdst library configuration tool only')
option('build-lib-const', type: 'boolean', value: false, description: 'build the fourdst library constants only')
option('build-python', type: 'boolean', value: true, description: 'build the python bindings so you can use fourdst from python. This will also build libcomposition, libconfig, and libconstants')
option('build-lib-log', type: 'boolean', value: false, description: 'build the fourdst library logging features only')
option('build-lib-plugin', type: 'boolean', value: false, description: 'build the fourdst plugin module only')
option('pkg_config', type: 'boolean', value: false, description: 'generate pkg-config file for all libraries and fourdst (defaults to false to allow easy pip building)')
option('electron_build_py_backend', type: 'boolean', value: false, description: 'use pyinstaller to build the python backend for the electron app')
option('build_tests', type: 'boolean', value: false, description: 'compile subproject tests')
option('build_lib_all', type: 'boolean', value: true, description: 'build the full fourdst library with all features enabled')
option('build_lib_comp', type: 'boolean', value: false, description: 'build the minimal fourdst library with only compression and decompression features enabled')
option('build_lib_config', type: 'boolean', value: false, description: 'build the fourdst library configuration tool only')
option('build_lib_const', type: 'boolean', value: false, description: 'build the fourdst library constants only')
option('build_python', type: 'boolean', value: true, description: 'build the python bindings so you can use fourdst from python. This will also build libcomposition, libconfig, and libconstants')
option('build_lib_log', type: 'boolean', value: false, description: 'build the fourdst library logging features only')
option('build_lib_plugin', type: 'boolean', value: false, description: 'build the fourdst plugin module only')