U
    P·5g   ã                   @   s   d dl Z dd„ Zdd„ ZdS )é    Nc                 C   s   t  | d¡ d S )NÚlibtorch)ÚgenericÚ_options)Úopt© r   ú:/home/yuhw/wc/larsoft925/src/wct-porting2/waft/libtorch.pyÚoptions   s    r   c                 C   sv   t | jdd ƒ}t | jd¡}|sDdddg}|r:|ddg7 }|dg7 }tj| dd	d
g|dd� |rrt| jdddgƒ d S )NÚwith_libtorch_libsÚcudaZtorchZ	torch_cpuZc10Z
torch_cudaZc10_cudar   ztorch/script.hzATen/ATen.hT)ÚincsÚlibsÚ	mandatoryZLINKFLAGS_LIBTORCHz-Wl,--no-as-needed,-ltorch_cudaz-Wl,--as-needed)Úgetattrr   r   Úwith_pÚ
_configureÚsetattrÚenv)Úcfgr   Ú	with_cudar   r   r   Ú	configure   s     

ýÿr   )r   r   r   r   r   r   r   Ú<module>   s   