U
    úá)f[  ã                   @   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/wire-cell-dev/waft/libtorch.pyÚoptions   s    r   c                 C   sT   t | jdd ƒ}|s dddddg}tj| ddg|d	d
� d|krPt| jdddgƒ d S )NÚwith_libtorch_libsZtorchZ	torch_cpuZ
torch_cudaZc10_cudaZc10r   ztorch/script.hF)ÚincsÚlibsÚ	mandatoryZLINKFLAGS_LIBTORCHz-Wl,--no-as-needed,-ltorch_cudaz-Wl,--as-needed)Úgetattrr   r   Ú
_configureÚsetattrÚenv)Úcfgr   r   r   r   Ú	configure   s    ýÿr   )r   r   r   r   r   r   r   Ú<module>   s   