-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (48 loc) · 1.48 KB
/
build.gradle.kts
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
49
50
51
52
53
54
55
56
import dev.nokee.platform.nativebase.SharedLibraryBinary
plugins {
id("dev.nokee.jni-library")
id("dev.nokee.cpp-language")
id("java")
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit test framework.
testImplementation(libs.junit)
// This dependency is used by the application.
implementation(libs.slf4j)
implementation(libs.slf4j.log4j12)
implementation(libs.log4j.core)
implementation(libs.log4j.api)
implementation(libs.log4j.slf4j.api)
implementation(libs.lombok)
implementation(libs.guava)
annotationProcessor(libs.lombok)
testAnnotationProcessor(libs.lombok)
}
tasks.withType<Test> {
// For 1B comparison test
jvmArgs = listOf("-Xmx2g")
}
library {
// Only Intel MacOS is developed and tested
targetMachines.set(listOf(machines.macOS.x86_64, machines.linux.x86_64))
binaries.configureEach {
if (this is SharedLibraryBinary) {
compileTasks.configureEach {
if (this is AbstractNativeCompileTask) {
// Required for noexcept on OSX x86_64
(this as AbstractNativeCompileTask).compilerArgs.add("-std=c++11");
}
}
linkTask.configure {
linkerArgs.add("-L/usr/local/lib/")
linkerArgs.add("-lprimesieve")
// Debugging purposes
linkerArgs.add("-v")
}
}
}
}