diff --git a/build.gradle b/build.gradle index 5aeabcd8e0..2374b8b46d 100644 --- a/build.gradle +++ b/build.gradle @@ -109,6 +109,26 @@ model { } } } + tasks { + def c = $.components + project.tasks.create('runCpp', Exec) { + def found = false + c.each { + if (it in NativeExecutableSpec && it.name == 'wpiutilDev') { + it.binaries.each { + if (!found) { + def arch = it.targetPlatform.architecture.name + if (arch == 'x86-64' || arch == 'x86') { + dependsOn it.tasks.install + commandLine it.tasks.install.runScript + found = true + } + } + } + } + } + } + } } apply from: 'publish.gradle'