Skip to content

Commit

Permalink
Added java library path to xcfa-cli test on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Jul 30, 2023
1 parent 784e396 commit d6d57a7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions subprojects/xcfa/xcfa-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.gradle.internal.os.OperatingSystem

plugins {
id("kotlin-common")
id("cli-tool")
Expand Down Expand Up @@ -41,3 +44,14 @@ dependencies {
application {
mainClassName = "hu.bme.mit.theta.xcfa.cli.XcfaCli"
}

tasks.test {
if (OperatingSystem.current().isLinux) {
val nativeLibTasks = project(":theta-llvm").tasks
dependsOn(nativeLibTasks.build)

val linkTask = nativeLibTasks.withType(LinkSharedLibrary::class).first()
systemProperty("java.library.path", linkTask.linkedFile.get().asFile.parent)
}
}

0 comments on commit d6d57a7

Please sign in to comment.