def test_sysconfig_provides_non_empty_flags(self): import nvidia.dali.sysconfig as dali_sysconfig assert "" != dali_sysconfig.get_include_flags() assert "" != dali_sysconfig.get_compile_flags() assert "" != dali_sysconfig.get_link_flags() assert "" != dali_sysconfig.get_include_dir() assert "" != dali_sysconfig.get_lib_dir()
def get_dali_build_flags(): dali_cflags = '' dali_lflags = '' try: import nvidia.dali.sysconfig as dali_sc dali_lib_path = dali_sc.get_lib_dir() dali_cflags=" ".join(dali_sc.get_compile_flags()) dali_lflags=" ".join(dali_sc.get_link_flags()) except: dali_path = get_module_path('nvidia/dali') if dali_path is not '': dali_cflags=" ".join(["-I" + dali_path + "/include", "-D_GLIBCXX_USE_CXX11_ABI=0"]) dali_lflags=" ".join(["-L" + dali_path, "-ldali"]) if dali_cflags is '' and dali_lflags is '': raise ImportError('Could not find DALI.') return (dali_cflags, dali_lflags)
def get_dali_build_flags(): dali_cflags = '' dali_lflags = '' try: import nvidia.dali.sysconfig as dali_sc dali_lib_path = dali_sc.get_lib_dir() # We are linking with DALI's C library, so we don't need the C++ compile flags # including the CXX11_ABI setting dali_cflags = " ".join(dali_sc.get_include_flags()) dali_lflags = " ".join(dali_sc.get_link_flags()) except: dali_path = get_module_path('nvidia/dali') if dali_path is not '': dali_cflags = " ".join(["-I" + dali_path + "/include"]) dali_lflags = " ".join(["-L" + dali_path, "-ldali"]) if dali_cflags is '' and dali_lflags is '': raise ImportError('Could not find DALI.') return (dali_cflags, dali_lflags)