Commit a25f51fc authored by Peter Steinbach's avatar Peter Steinbach

version tests

parent 17dcf4d1
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
def project_root = file(".").absolutePath
def native_build_dir = './build/cpp'
def native_source_dir = './src/cpp'
task create_build_dir << {
println 'create_build_dir'
new File(native_build_dir).mkdirs()
}
task cmake(type:Exec) {
workingDir(native_build_dir)
inputs.dir file(native_source_dir).absolutePath
outputs.file file(native_build_dir).absolutePath + '/Makefile'
def native_build_type = project.hasProperty("sqy_build_type") ? sqy_build_type : "Release"
def cmake_binary_path = project.hasProperty("cmake_binary_abspath") ? cmake_binary_abspath : "cmake"
def cmake_args = [] as List
cmake_args.add("-DCMAKE_BUILD_TYPE="+native_build_type+" ")
cmake_args += file(native_source_dir).absolutePath
if (Os.isFamily(Os.FAMILY_WINDOWS)){
executable 'cmake.exe'
}
else if (Os.isFamily(Os.FAMILY_MAC))
{
executable 'cmake'
args cmake_args
}
else if (Os.isFamily(Os.FAMILY_UNIX))
{
println "using "+cmake_binary_path
executable cmake_binary_path
args cmake_args
// commandLine 'cmake',file(native_source_dir).absolutePath
}
}
cmake.dependsOn create_build_dir
test.dependsOn cmake
org.gradle.daemon=true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment