mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
* Dedicated RoboRIO Toolchain, allow Toolchain Path to change * Add cCompiler Tool to correctly discover RoboRIO GCC on Mac * Add @333fred requests for GString and ToolChainPath * Add Toolchain Path option to README
52 lines
1.9 KiB
Groovy
52 lines
1.9 KiB
Groovy
apply plugin: 'cpp'
|
|
|
|
defineNetworkTablesProperties()
|
|
defineWpiUtilProperties()
|
|
defineCsCoreProperties()
|
|
|
|
ext.shared = "${project(':wpilibc').projectDir.getAbsolutePath()}/shared"
|
|
ext.athena = "${project(':wpilibc').projectDir.getAbsolutePath()}/athena"
|
|
ext.hal = project(':hal').projectDir.getAbsolutePath()
|
|
|
|
model {
|
|
components {
|
|
FRCUserProgram(NativeExecutableSpec) {
|
|
targetPlatform 'roborio-arm'
|
|
binaries.all {
|
|
tasks.withType(CppCompile) {
|
|
cppCompiler.args "-DNAMESPACED_WPILIB"
|
|
addNiLibraryLinks(linker, targetPlatform)
|
|
addNetworkTablesLibraryLinks(it, linker, targetPlatform)
|
|
addCsCoreLibraryLinks(it, linker, targetPlatform)
|
|
}
|
|
|
|
cppCompiler.args '-pthread', '-Wno-unused-variable'
|
|
linker.args '-pthread', '-Wno-unused-variable', '-Wl,-rpath,/opt/GenICam_v3_0_NI/bin/Linux32_ARM'
|
|
}
|
|
sources {
|
|
cpp {
|
|
def dir = 'wpilibC++IntegrationTests'
|
|
source {
|
|
srcDir 'src'
|
|
include '**/*.cpp'
|
|
}
|
|
source {
|
|
srcDir 'gtest/src'
|
|
include 'gtest-all.cc', 'gtest_main.cc'
|
|
}
|
|
exportedHeaders {
|
|
srcDirs = ['include', 'gtest', 'gtest/include',
|
|
"${project.athena}/include", "${project.shared}/include",
|
|
"${project.hal}/include/HAL", netTablesInclude, wpiUtilInclude, csCoreInclude]
|
|
include '**/*.h'
|
|
}
|
|
|
|
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
|
lib project: ':hal', library: 'HALAthena', linkage: 'shared'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|