RsBundle  Check-in [8a75c0bcc8]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove build script.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8a75c0bcc8325b98c074fa8743a064a69a98d876
User & Date: fifr 2017-03-16 15:06:48.806
Context
2017-03-16
20:51
Use `const_cstr` for C-string literals. check-in: 30e5f0f086 user: fifr tags: trunk
15:06
Remove build script. check-in: 8a75c0bcc8 user: fifr tags: trunk
14:57
Use `cplex-sys` crate for interfacing with cplex. check-in: b318be645a user: fifr tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Cargo.toml.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[package]
name = "bundle"
version = "0.3.0"
authors = ["Frank Fischer <frank-fischer@shadow-soft.de>"]

#build = "build.rs"

[dependencies]
libc = "^0.2.6"
quick-error = "^1.1.0"
log = "^0.3.6"
cplex-sys = { version = "^0.1", path = "../cplex-sys" }

[dev-dependencies]





<
<







1
2
3
4
5


6
7
8
9
10
11
12
[package]
name = "bundle"
version = "0.3.0"
authors = ["Frank Fischer <frank-fischer@shadow-soft.de>"]



[dependencies]
libc = "^0.2.6"
quick-error = "^1.1.0"
log = "^0.3.6"
cplex-sys = { version = "^0.1", path = "../cplex-sys" }

[dev-dependencies]
Deleted build.rs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright (c) 2016, 2017 Frank Fischer <frank-fischer@shadow-soft.de>
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see  <http://www.gnu.org/licenses/>
 */

use std::env;
use std::fs;
use std::path::Path;

fn main() {
    match env::var("GUROBI_HOME") {
        Ok(grb) => {
            let grb = Path::new(&grb).join("lib");
            if let Ok(dir) = fs::read_dir(&grb) {
                for entry in dir {
                    let fname = entry.unwrap().file_name();
                    let fname = fname.to_str().unwrap();
                    if fname.starts_with("libgurobi") && fname.ends_with(".so") {
                        println!("cargo:rustc-link-search={}", grb.to_str().unwrap());
                        println!("cargo:rustc-link-lib={}", &fname[3 .. fname.len()-3]);
                        break;
                    }
                }
            }
        },
        Err(_) => panic!("GUROBI_HOME environment variable not set"),
    }

    match env::var("CPLEX_HOME") {
        Ok(cpx) => {
            println!("cargo:rustc-link-search={}/lib/x86-64_sles10_4.1/static_pic", cpx);
            println!("cargo:rustc-link-lib=cplex");
        },
        Err(_) => panic!("CPLEX_HOME environment variable not set"),
    }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<