Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-CCC #4

Merged
merged 14 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,6 @@
"queue": "cpp"
},
"wpilib.useWindbgX": true,
"C_Cpp.errorSquiggles": "enabled"
"C_Cpp.errorSquiggles": "enabled",
"wpilib.skipTests": true
}
54 changes: 35 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ plugins {

// Define my targets (RoboRIO) and artifacts (deployable files)
deploy {
println "Setting up deploy targets and artifacts..."
targets {
roborio(getTargetTypeClass('RoboRIO')) {
team = project.frc.getTeamNumber()
debug = project.frc.getDebugOrDefault(false)

println "Deploy team # set to ${team}."
println "Debug set to ${debug} (disabled by default).\n"


artifacts {
frcCpp(getArtifactTypeClass('FRCNativeArtifact')) {
}
Expand All @@ -28,22 +33,27 @@ deploy {
def deployArtifact = deploy.targets.roborio.artifacts.frcCpp

// Set this to true to enable desktop support.
def includeDesktopSupport = false
def includeDesktopSupport = true

// Set to true to run simulation in debug mode
wpi.cpp.debugSimulation = true
wpi.cpp.debugSimulation = false

// Default enable simgui
wpi.sim.addGui().defaultEnabled = true
wpi.sim.addGui().defaultEnabled = false
// Enable DS but not by default
wpi.sim.addDriverstation()

model {
components {
frcUserProgram(NativeExecutableSpec) {
println "Configuring frcUserProgram..."
targetPlatform wpi.platforms.roborio
if (includeDesktopSupport) {
targetPlatform wpi.platforms.desktop
binaries.all {
cppCompiler.args << '-DNOMINMAX'
println "Applied compiler argument NOMINMAX to allow for compilation on Windows platform."
}
}

sources.cpp {
Expand Down Expand Up @@ -71,22 +81,28 @@ model {
wpi.cpp.deps.wpilib(it)
}
}
// Uncomment and configure test suites if needed
// testSuites {
// frcUserProgramTest(GoogleTestTestSuiteSpec) {
// testing $.components.frcUserProgram
// sources.cpp {
// source {
// srcDir 'src/test/cpp'
// include '**/*.cpp'
// }
// }
// wpi.cpp.enableExternalTasks(it)
// wpi.cpp.vendor.cpp(it)
// wpi.cpp.deps.wpilib(it)
// wpi.cpp.deps.googleTest(it)
// }
// }

testSuites {
frcUserProgramTest(GoogleTestTestSuiteSpec) {
testing $.components.frcUserProgram

println "Configuring frcUserProgramTest..."
sources.cpp {
source {
srcDir 'src/test/cpp'
include '**/*.cpp'
}
}
binaries.all {
cppCompiler.args << '-DNOMINMAX'
println "Applied compiler argument NOMINMAX to allow for compilation on Windows platform."
}
wpi.cpp.enableExternalTasks(it)
wpi.cpp.vendor.cpp(it)
wpi.cpp.deps.wpilib(it)
wpi.cpp.deps.googleTest(it)
}
}
}

spotless {
Expand Down
Loading
Loading