Files
allwpilib/wpilibcIntegrationTests/build.gradle
Peter Johnson 59267da72b Namespace all wpilibc functions/classes into "frc" namespace. (#311)
Base.h provides a backwards compatibility shim (enabled unless
NAMESPACED_WPILIB is defined) that does a "using namespace frc".
However, as some header files do not include Base.h, this may
be a breaking change in some corner cases (with an easy fix).

Fixes #218.
2016-11-01 22:33:12 -07:00

50 lines
1.8 KiB
Groovy

apply plugin: 'cpp'
defineNetworkTablesProperties()
defineWpiUtilProperties()
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 'arm'
binaries.all {
tasks.withType(CppCompile) {
cppCompiler.args "-DNAMESPACED_WPILIB"
addNiLibraryLinks(linker, targetPlatform)
addStaticNetworkTablesLibraryLinks(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]
include '**/*.h'
}
lib project: ':wpilibc', library: 'wpilibc', linkage: 'static'
lib project: ':hal', library: 'HALAthena', linkage: 'static'
}
}
}
}
}