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

[build] CMake: remove external HAL option #6797

Merged
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
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ option(WITH_TESTS "Build unit tests (requires internet connection)" ON)
option(WITH_GUI "Build GUI items" ON)
option(WITH_SIMULATION_MODULES "Build simulation modules" ON)

# Options for external HAL.
option(WITH_EXTERNAL_HAL "Use a separately built HAL" OFF)
set(EXTERNAL_HAL_FILE "" CACHE FILEPATH "Location to look for an external HAL CMake File")

# Options for using a package manager (e.g., vcpkg) for certain dependencies.
option(USE_SYSTEM_FMTLIB "Use system fmtlib" OFF)
option(USE_SYSTEM_LIBUV "Use system libuv" OFF)
Expand Down
4 changes: 0 additions & 4 deletions README-CMAKE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ The following build options are available:
* This option will build the wpimath library. This option must be on to build wpilib.
* `WITH_WPIUNITS` (ON Default)
* This option will build the wpiunits library. This option must be on to build the Java wpimath library and requires `WITH_JAVA` to also be on.
* `WITH_EXTERNAL_HAL` (OFF Default)
* This option will build wpilib with an externally built HAL.
* `EXTERNAL_HAL_FILE`
* Set this option to the CMake File of the externally built HAL. NOTE: set it to the file itself, not the folder the file is located in!
* `OPENCV_JAVA_INSTALL_DIR`
* Set this option to the location of the archive of the OpenCV Java bindings (it should be called opencv-xxx.jar, with the x'es being version numbers). NOTE: set it to the LOCATION of the file, not the file itself!
* `NO_WERROR` (OFF Default)
Expand Down
21 changes: 2 additions & 19 deletions hal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,13 @@ include(AddTest)
file(
GLOB hal_shared_native_src
src/main/native/cpp/*.cpp
hal_shared_native_src
src/main/native/cpp/cpp/*.cpp
hal_shared_native_src
src/main/native/cpp/handles/*.cpp
hal_sim_native_src
src/main/native/sim/*.cpp
hal_sim_native_src
src/main/native/sim/mockdata/*.cpp
)
add_library(hal ${hal_shared_native_src})
file(GLOB_RECURSE hal_sim_native_src src/main/native/sim/*.cpp)
add_library(hal ${hal_shared_native_src} ${hal_sim_native_src})
wpilib_target_warnings(hal)
set_target_properties(hal PROPERTIES DEBUG_POSTFIX "d")

if(USE_EXTERNAL_HAL)
include(${EXTERNAL_HAL_FILE})
else()
target_sources(hal PRIVATE ${hal_sim_native_src})
endif()

set_target_properties(hal PROPERTIES OUTPUT_NAME "wpiHal")

target_include_directories(
Expand Down Expand Up @@ -77,11 +65,6 @@ if(WITH_JAVA)
install_jar_exports(TARGETS hal_jar FILE hal_jar.cmake DESTINATION share/hal)

add_library(haljni ${hal_shared_jni_src})

if(USE_EXTERNAL_HAL)
include(${EXTERNAL_HAL_FILE})
endif()

set_target_properties(haljni PROPERTIES OUTPUT_NAME "wpiHaljni")

wpilib_target_warnings(haljni)
Expand Down
Loading