File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ mkl-dynamic-lp64-seq = []
2727mkl-dynamic-ilp64-iomp = []
2828mkl-dynamic-ilp64-seq = []
2929
30- # Enable downloading from AWS S3 when not found
31- download = []
30+ # Enable downloading from AWS S3 when system MKL not found
31+ download = [" intel-mkl-tool/archive " ]
3232# (Experimental) Cache download archive ad $XDG_DATA_HOME/intel-mkl-tool/
3333xdg-data-home = []
3434
Original file line number Diff line number Diff line change 2020// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121// SOFTWARE.
2222
23+ #![ cfg_attr( feature = "download" , allow( unreachable_code) ) ]
24+
2325use anyhow:: * ;
2426use intel_mkl_tool:: * ;
2527use std:: { env, path:: * } ;
@@ -51,7 +53,8 @@ fn main() -> Result<()> {
5153 }
5254
5355 // download if not found
54- if cfg ! ( feature = "download" ) {
56+ #[ cfg( feature = "download" ) ]
57+ {
5558 let path = if cfg ! ( feature = "xdg-data-home" ) {
5659 xdg_home_path ( )
5760 } else {
@@ -64,6 +67,8 @@ fn main() -> Result<()> {
6467 cfg. download ( path) ?;
6568 let entry = Entry :: from_config ( cfg) . unwrap ( ) ; // must found
6669 entry. print_cargo_metadata ( ) ;
70+ return Ok ( ( ) ) ;
6771 }
68- Ok ( ( ) )
72+
73+ bail ! ( "No MKL found, and download flag is off." ) ;
6974}
You can’t perform that action at this time.
0 commit comments