mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds a `@NoDiscard` annotation that can be placed on methods to guarantee their return values are used and on types to guarantee that any method returning that type uses the return value.
Methods that call `@NoDiscard`-annotated functions can add a `@SuppressWarnings("NoDiscard")` or `@SuppressWarnings("all")` annotation (or annotation on the class declaring that method) to silence the compiler error warnings.
38 lines
1.0 KiB
CMake
38 lines
1.0 KiB
CMake
project(wpiannotations)
|
|
|
|
# Java bindings
|
|
if(WITH_JAVA)
|
|
include(UseJava)
|
|
|
|
file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java)
|
|
|
|
add_jar(
|
|
wpiannotations_jar
|
|
${JAVA_SOURCES}
|
|
OUTPUT_NAME wpiannotations
|
|
OUTPUT_DIR ${WPILIB_BINARY_DIR}/${java_lib_dest}
|
|
)
|
|
set_property(TARGET wpiannotations_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiannotations_jar DESTINATION ${java_lib_dest})
|
|
install_jar_exports(
|
|
TARGETS wpiannotations_jar
|
|
FILE wpiannotations.cmake
|
|
DESTINATION share/wpiannotations
|
|
)
|
|
install(FILES wpiannotations-config.cmake DESTINATION share/wpiannotations)
|
|
endif()
|
|
|
|
if(WITH_JAVA_SOURCE)
|
|
include(UseJava)
|
|
include(CreateSourceJar)
|
|
add_source_jar(
|
|
wpiannotations_src_jar
|
|
BASE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/src/main/java
|
|
OUTPUT_NAME wpiannotations-sources
|
|
)
|
|
set_property(TARGET wpiannotations_src_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiannotations_src_jar DESTINATION ${java_lib_dest})
|
|
endif()
|