def get_compile_args(libfabric=get()): flags = [] if libfabric == 'bundled': flags = third_party_utils.default_get_compile_args('libfabric', ucp=get_uniq_cfg_path()) elif libfabric == 'system': # Allow overriding pkg-config via LIBFABRIC_DIR, for platforms # without pkg-config. libfab_dir_val = overrides.get('LIBFABRIC_DIR') if libfab_dir_val: flags.append('-I' + libfab_dir_val + '/include') else: # Try using pkg-config to get the compile-time flags. pcflags = third_party_utils.pkgconfig_get_compile_args('libfabric', system=True) for pcl in pcflags: flags.append(pcl) launcher_val = chpl_launcher.get() ofi_oob_val = overrides.get_environ('CHPL_RT_COMM_OFI_OOB') if 'mpi' in launcher_val or ( ofi_oob_val and 'mpi' in ofi_oob_val ): mpi_dir_val = overrides.get_environ('MPI_DIR') if mpi_dir_val: flags.append('-I' + mpi_dir_val + '/include') return flags
def get_compile_args(libfabric): flags = [] if libfabric == 'system': # Try using pkg-config to get the compile-time flags. pcflags = third_party_utils.pkgconfig_get_compile_args( 'libfabric', system=True) for pcl in pcflags: flags.append(pcl) elif libfabric == 'libfabric': error("CHPL_LIBFABRIC=libfabric is not yet supported", ValueError) launcher_val = chpl_launcher.get() ofi_oob_val = overrides.get_environ('CHPL_RT_COMM_OFI_OOB') if 'mpi' in launcher_val or ( ofi_oob_val and 'mpi' in ofi_oob_val ): mpi_dir_val = overrides.get_environ('MPI_DIR') if mpi_dir_val: flags.append('-I' + mpi_dir_val + '/include') return flags