@@ -126,33 +126,22 @@ lazy_static! {
126
126
static ref RDFOX_DOWNLOAD_HOST : & ' static str = option_env!( "RDFOX_DOWNLOAD_HOST" )
127
127
. unwrap_or( "https://rdfox-distribution.s3.eu-west-2.amazonaws.com/release" ) ;
128
128
}
129
- #[ cfg( feature = "rdfox-6-2" ) ]
130
- lazy_static ! {
131
- static ref RDFOX_VERSION_EXPECTED : & ' static str =
132
- option_env!( "RDFOX_VERSION_EXPECTED" ) . unwrap_or( "6.2" ) ;
133
- }
134
- #[ cfg( feature = "rdfox-6-3a" ) ]
135
- lazy_static ! {
136
- static ref RDFOX_VERSION_EXPECTED : & ' static str =
137
- option_env!( "RDFOX_VERSION_EXPECTED" ) . unwrap_or( "6.3a" ) ;
138
- }
139
- #[ cfg( feature = "rdfox-6-3b" ) ]
140
- lazy_static ! {
141
- static ref RDFOX_VERSION_EXPECTED : & ' static str =
142
- option_env!( "RDFOX_VERSION_EXPECTED" ) . unwrap_or( "6.3b" ) ;
143
- }
144
- #[ cfg( feature = "rdfox-7-0a" ) ]
129
+
130
+ #[ cfg( not( any( feature = "rdfox-7-0a" , feature = "rdfox-7-2" , ) ) ) ]
131
+ compile_error ! ( "You have to at least specify one of the rdfox-X-Y version number features" ) ;
132
+
145
133
lazy_static ! {
146
- static ref RDFOX_VERSION_EXPECTED : & ' static str =
147
- option_env!( "RDFOX_VERSION_EXPECTED" ) . unwrap_or( "7.0a" ) ;
134
+ static ref RDFOX_VERSION_EXPECTED : & ' static str = option_env!( "RDFOX_VERSION_EXPECTED" )
135
+ . unwrap_or(
136
+ if cfg!( feature = "rdfox-7-0a" ) {
137
+ "7.0a"
138
+ } else if cfg!( feature = "rdfox-7-2" ) {
139
+ "7.2"
140
+ } else {
141
+ panic!( "Unknown RDFOX version" )
142
+ }
143
+ ) ;
148
144
}
149
- #[ cfg( not( any(
150
- feature = "rdfox-6-2" ,
151
- feature = "rdfox-6-3a" ,
152
- feature = "rdfox-6-3b" ,
153
- feature = "rdfox-7-0a"
154
- ) ) ) ]
155
- compile_error ! ( "You have to at least specify one of the rdfox-X-Y version number features" ) ;
156
145
157
146
fn rdfox_download_url ( ) -> String {
158
147
let host = * RDFOX_DOWNLOAD_HOST ;
@@ -309,9 +298,9 @@ fn set_clang_path<S: Into<String>>(path: Option<S>) -> Option<(PathBuf, PathBuf)
309
298
if !clang_bin. exists ( ) {
310
299
clang_bin = path. join ( "clang" ) ;
311
300
}
312
- if clang_bin. exists ( ) {
313
- println ! ( "cargo:warning=using {}" , clang_bin. display( ) ) ;
314
- }
301
+ // if clang_bin.exists() {
302
+ // println!("cargo:warning=using {}", clang_bin.display());
303
+ // }
315
304
Some ( ( path, clang_bin) )
316
305
}
317
306
@@ -330,12 +319,12 @@ fn set_llvm_config_path<S: Into<String>>(path: Option<S>) -> Option<(PathBuf, Pa
330
319
if !llvm_config_bin. exists ( ) {
331
320
llvm_config_bin = path. join ( "llvm-config" ) ;
332
321
}
333
- if llvm_config_bin. exists ( ) {
334
- println ! (
335
- "cargo:warning=using {}" ,
336
- llvm_config_bin. display( )
337
- ) ;
338
- }
322
+ // if llvm_config_bin.exists() {
323
+ // println!(
324
+ // "cargo:warning=using {}",
325
+ // llvm_config_bin.display()
326
+ // );
327
+ // }
339
328
Some ( ( path, llvm_config_bin) )
340
329
}
341
330
@@ -400,6 +389,7 @@ fn check_homebrew_prefix() -> Option<PathBuf> {
400
389
if let Ok ( output) = Command :: new ( "brew" ) . args ( [ "--prefix" ] ) . output ( ) {
401
390
let homebrew_prefix =
402
391
String :: from_utf8 ( output. stdout ) . expect ( "`brew --prefix` output must be UTF-8" ) ;
392
+ #[ allow( irrefutable_let_patterns) ]
403
393
if let Ok ( path) = PathBuf :: try_from ( homebrew_prefix) {
404
394
return Some ( path) ;
405
395
}
0 commit comments