@@ -21,6 +21,56 @@ project('nixl', 'CPP', version: '0.8.0',
2121 meson_version : ' >= 0.64.0'
2222)
2323
24+ enable_plugins_opt = get_option (' enable_plugins' )
25+ disable_plugins_opt = get_option (' disable_plugins' )
26+ is_explicit_enable = enable_plugins_opt != ''
27+
28+ if enable_plugins_opt != '' and disable_plugins_opt != ''
29+ error (' Cannot specify both enable_plugins and disable_plugins options' )
30+ endif
31+
32+ all_plugins = [' UCX' , ' LIBFABRIC' , ' POSIX' , ' OBJ' , ' GDS' , ' GDS_MT' , ' MOONCAKE' , ' HF3FS' , ' GUSLI' , ' GPUNETIO' , ' UCCL' ]
33+
34+ enabled_plugins = {}
35+
36+ if enable_plugins_opt != ''
37+ enabled_plugins_list = []
38+ foreach p : enable_plugins_opt.split(' ,' )
39+ p_stripped = p.strip()
40+ if p_stripped not in all_plugins
41+ error (' Requested plugin "' + p_stripped + ' " is not available. Available plugins are: ' + ' , ' .join(all_plugins))
42+ endif
43+ enabled_plugins_list += [p_stripped]
44+ endforeach
45+
46+ foreach plugin : all_plugins
47+ enabled_plugins += {plugin : plugin in enabled_plugins_list}
48+ endforeach
49+
50+ message (' Building only selected plugins: ' + enable_plugins_opt)
51+ elif disable_plugins_opt != ''
52+ disabled_plugins_list = []
53+ foreach p : disable_plugins_opt.split(' ,' )
54+ p_stripped = p.strip()
55+ if p_stripped not in all_plugins
56+ error (' Cannot exclude unknown plugin "' + p_stripped + ' ". Available plugins are: ' + ' , ' .join(all_plugins))
57+ endif
58+ disabled_plugins_list += [p_stripped]
59+ endforeach
60+
61+ foreach plugin : all_plugins
62+ enabled_plugins += {plugin : plugin not in disabled_plugins_list}
63+ endforeach
64+
65+ message (' Building all plugins except: ' + disable_plugins_opt)
66+ else
67+ foreach plugin : all_plugins
68+ enabled_plugins += {plugin : true }
69+ endforeach
70+
71+ message (' Building all available plugins' )
72+ endif
73+
2474# set up some global vars for compiler, platform, configuration, etc.
2575cpp = meson .get_compiler(' cpp' )
2676fs = import (' fs' )
@@ -110,7 +160,7 @@ if cuda_dep.found()
110160 nvcc_flags_link += [' -gencode=arch=compute_90,code=sm_90' ]
111161 add_project_link_arguments (nvcc_flags_link, language : ' cuda' )
112162 message (' nvcc version: ' + nvcc.version())
113- if nvcc.version().version_compare(' >=12.8' ) and nvcc.version().version_compare( ' <13.0 ' )
163+ if nvcc.version().version_compare(' >=12.8' )
114164 doca_gpunetio_dep = dependency (' doca-gpunetio' , required : false )
115165 else
116166 warning (' GPUNETIO plugin not supported in CUDA version: ' + nvcc.version())
@@ -262,7 +312,7 @@ if get_option('buildtype') == 'debug'
262312 run_command (' truncate' , ' -s 0' , plugfile, check : true )
263313endif
264314
265- nixl_inc_dirs = include_directories (' src/api/cpp' , ' src/api/cpp/backend' , ' src/infra' , ' src/core' )
315+ nixl_inc_dirs = include_directories (' src/api/cpp' , ' src/api/cpp/backend' , ' src/infra' , ' src/core' , ' src/core/telemetry ' )
266316nixl_gpu_inc_dirs = include_directories (' src/api/gpu/ucx' )
267317plugins_inc_dirs = include_directories (' src/plugins' )
268318utils_inc_dirs = include_directories (' src/utils' )
0 commit comments