mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[build] Disable Gazebo builds when -PmakeSim is not set (#2810)
This commit is contained in:
committed by
GitHub
parent
0dfee4745c
commit
f24f282442
@@ -21,16 +21,14 @@ try {
|
||||
gazebo_linker_args = "pkg-config --libs gazebo protobuf".execute().text.split()
|
||||
} catch(Exception ex) { }
|
||||
|
||||
if (!gazebo_version?.trim()) {
|
||||
println "Gazebo development files are not available. (pkg-config --modversion gazebo failed)"
|
||||
if (project.hasProperty("makeSim")) {
|
||||
/* Force the build even though we did not find protobuf. */
|
||||
if (project.hasProperty("makeSim")) {
|
||||
if (!gazebo_version?.trim()) {
|
||||
println "Gazebo development files are not available. (pkg-config --modversion gazebo failed)"
|
||||
println "makeSim set. Forcing build - failure likely."
|
||||
}
|
||||
else {
|
||||
ext.skip_frc_plugins = true
|
||||
println "Skipping FRC Plugins."
|
||||
}
|
||||
} else {
|
||||
ext.skip_frc_plugins = true
|
||||
println "Skipping FRC Plugins."
|
||||
}
|
||||
|
||||
evaluationDependsOn(":simulation:gz_msgs")
|
||||
|
||||
@@ -26,17 +26,14 @@ try {
|
||||
} catch(Exception ex) {
|
||||
}
|
||||
|
||||
if (!protobuf_version?.trim()) {
|
||||
println "Protobuf is not available. (pkg-config --modversion protobuf failed)"
|
||||
protobuf_version = "+"
|
||||
if (project.hasProperty("makeSim")) {
|
||||
/* Force the build even though we did not find protobuf. */
|
||||
if (project.hasProperty("makeSim")) {
|
||||
if (!protobuf_version?.trim()) {
|
||||
println "Protobuf is not available. (pkg-config --modversion protobuf failed)"
|
||||
println "makeSim set. Forcing build - failure likely."
|
||||
}
|
||||
else {
|
||||
ext.skip_gz_msgs = true
|
||||
println "Skipping gz_msgs."
|
||||
}
|
||||
} else {
|
||||
ext.skip_gz_msgs = true
|
||||
println "Skipping gz msgs."
|
||||
}
|
||||
|
||||
tasks.whenTaskAdded { task ->
|
||||
@@ -88,6 +85,11 @@ model {
|
||||
binaries {
|
||||
all {
|
||||
cppCompiler.args "-fPIC"
|
||||
|
||||
// Disable -Wzero-length-array on Clang
|
||||
if (it.targetPlatform.operatingSystem.isMacOsX()) {
|
||||
it.cppCompiler.args.add('-Wno-error=zero-length-array')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,16 +19,14 @@ try {
|
||||
gazebo_linker_args = "pkg-config --libs gazebo protobuf".execute().text.split()
|
||||
} catch(Exception ex) { }
|
||||
|
||||
if (!gazebo_version?.trim()) {
|
||||
println "Gazebo development files are not available. (pkg-config --modversion gazebo failed)"
|
||||
if (project.hasProperty("makeSim")) {
|
||||
/* Force the build even though we did not find protobuf. */
|
||||
if (project.hasProperty("makeSim")) {
|
||||
if (!gazebo_version?.trim()) {
|
||||
println "Gazebo development files are not available. (pkg-config --modversion gazebo failed)"
|
||||
println "makeSim set. Forcing build - failure likely."
|
||||
}
|
||||
else {
|
||||
ext.skip_frc_plugins = true
|
||||
println "Skipping FRC Plugins."
|
||||
}
|
||||
} else {
|
||||
ext.skip_frc_plugins = true
|
||||
println "Skipping FRC Plugins."
|
||||
}
|
||||
|
||||
evaluationDependsOn(":simulation:gz_msgs")
|
||||
|
||||
Reference in New Issue
Block a user