forked from datastax/php-driver
-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev>
- Loading branch information
1 parent
a8a4ced
commit b685080
Showing
5 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,9 @@ cassandra.log | |
/**/vendor/ | ||
/**/.idea/ | ||
/**/.idea/ | ||
|
||
|
||
# Added by cargo | ||
|
||
/target | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "scylladb-php-driver" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
||
|
||
[build-dependencies] | ||
cc = { version = "1.0", features = ["parallel"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
use std::fs::read_dir; | ||
|
||
use cc::Build; | ||
|
||
fn main() { | ||
let mut build = Build::new(); | ||
|
||
build | ||
.cpp(true) | ||
.include("include") | ||
.include("util/include") | ||
.include("ZendCPP") | ||
.include("ZendCPP/String") | ||
.include(".") | ||
.define("HAVE_DLFCN_H", Some("1")) | ||
.define("HAVE_STDIO_H", Some("1")) | ||
.define("HAVE_STDINT_H", Some("1")) | ||
.define("HAVE_INTTYPES_H", Some("1")) | ||
.define("HAVE_SYS_STAT_H", Some("1")) | ||
.define("HAVE_SYS_TYPES_H", Some("1")) | ||
.define("HAVE_STRING_H", Some("1")) | ||
.define("HAVE_UNISTD_H", Some("1")) | ||
.extra_warnings(true); | ||
|
||
read_dir("src").unwrap().for_each(|entry| { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
|
||
println!("{:?}", path); | ||
let ext = path.extension().unwrap().to_str(); | ||
|
||
if ext == Some("cpp") || ext == Some("c") { | ||
build.file(path); | ||
} | ||
}); | ||
|
||
read_dir("util/src").unwrap().for_each(|entry| { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
|
||
let ext = path.extension().unwrap().to_str(); | ||
|
||
if ext == Some("cpp") || ext == Some("c") { | ||
build.file(path); | ||
} | ||
}); | ||
|
||
read_dir("ZendCPP/String").unwrap().for_each(|entry| { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
|
||
let ext = path.extension().unwrap().to_str(); | ||
|
||
if ext == Some("cpp") || ext == Some("c") { | ||
build.file(path); | ||
} | ||
}); | ||
|
||
read_dir("ZendCPP").unwrap().for_each(|entry| { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
|
||
let ext = path.extension().unwrap().to_str(); | ||
|
||
if ext == Some("cpp") || ext == Some("c") { | ||
build.file(path); | ||
} | ||
}); | ||
|
||
build.compile("cassandra"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|