diff --git a/meson.build b/meson.build index 57b87f4c3..d13c3eb41 100644 --- a/meson.build +++ b/meson.build @@ -188,7 +188,9 @@ else endif libfabric_path = get_option('libfabric_path') -if libfabric_path != '' +if get_option('disable_libfabric_backend') + libfabric_dep = disabler() +elif libfabric_path != '' libfabric_lib_path = libfabric_path + '/lib' libfabric_inc_path = libfabric_path + '/include' # Check if path is absolute diff --git a/meson_options.txt b/meson_options.txt index fc28c08f2..8bd464748 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,6 +19,7 @@ option('etcd_inc_path', type: 'string', value: '', description: 'Path to ETCD He option('etcd_lib_path', type: 'string', value: '', description: 'Path to ETCD Libraries') option('disable_gds_backend', type : 'boolean', value : false, description : 'disable gds backend') option('disable_mooncake_backend', type : 'boolean', value : false, description : 'disable mooncake backend') +option('disable_libfabric_backend', type : 'boolean', value : false, description : 'disable libfabric backend') option('install_headers', type : 'boolean', value : true, description : 'install headers') option('gds_path', type: 'string', value: '/usr/local/cuda/', description: 'Path to GDS CuFile install') option('cudapath_inc', type: 'string', value: '', description: 'Include path for CUDA') diff --git a/src/plugins/meson.build b/src/plugins/meson.build index 2a97127b4..da7562a3a 100644 --- a/src/plugins/meson.build +++ b/src/plugins/meson.build @@ -23,7 +23,7 @@ endif subdir('posix') # Always try to build POSIX backend, it will handle its own dependencies subdir('obj') # Always try to build Obj backend, it will handle its own dependencies -if libfabric_dep.found() +if libfabric_dep.found() and not get_option('disable_libfabric_backend') subdir('libfabric') endif diff --git a/src/utils/meson.build b/src/utils/meson.build index e7ee0a508..3c47ab753 100644 --- a/src/utils/meson.build +++ b/src/utils/meson.build @@ -21,6 +21,6 @@ endif subdir('stream') subdir('file') -if libfabric_dep.found() +if libfabric_dep.found() and not get_option('disable_libfabric_backend') subdir('libfabric') endif diff --git a/test/unit/utils/meson.build b/test/unit/utils/meson.build index d6bc46592..c95a93e13 100644 --- a/test/unit/utils/meson.build +++ b/test/unit/utils/meson.build @@ -14,7 +14,7 @@ # limitations under the License. subdir('common') -if libfabric_dep.found() +if libfabric_dep.found() and not get_option('disable_libfabric_backend') subdir('libfabric') endif subdir('serdes')