Merge pull request 'Add Linux HAL options' (#663) from eive/fsfw:mueller/cmake-linux-hal-options into development
All checks were successful
fsfw/fsfw/pipeline/head This commit looks good

Reviewed-on: #663
This commit is contained in:
Ulrich Mohr 2022-08-15 13:58:09 +02:00
commit 0e7ec79af9

View File

@ -118,6 +118,12 @@ option(FSFW_ADD_INTERNAL_TESTS "Add internal unit tests" ON)
option(FSFW_ADD_UNITTESTS "Add regular unittests. Requires Catch2" OFF) option(FSFW_ADD_UNITTESTS "Add regular unittests. Requires Catch2" OFF)
option(FSFW_ADD_HAL "Add Hardware Abstraction Layer" ON) option(FSFW_ADD_HAL "Add Hardware Abstraction Layer" ON)
if(UNIX)
option(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS "Add Linux peripheral drivers"
OFF)
option(FSFW_HAL_LINUX_ADD_LIBGPIOD "Attempt to add Linux GPIOD drivers" OFF)
endif()
# Optional sources # Optional sources
option(FSFW_ADD_PUS "Compile with PUS sources" ON) option(FSFW_ADD_PUS "Compile with PUS sources" ON)
option(FSFW_ADD_MONITORING "Compile with monitoring components" ON) option(FSFW_ADD_MONITORING "Compile with monitoring components" ON)
@ -183,7 +189,10 @@ if(FSFW_BUILD_TESTS)
endif() endif()
endif() endif()
message(STATUS "${MSG_PREFIX} Finding and/or providing ETL library") message(
STATUS
"${MSG_PREFIX} Finding and/or providing etl library with version ${FSFW_ETL_LIB_MAJOR_VERSION}"
)
# Check whether the user has already installed ETL first # Check whether the user has already installed ETL first
find_package(${FSFW_ETL_LIB_NAME} ${FSFW_ETL_LIB_MAJOR_VERSION} QUIET) find_package(${FSFW_ETL_LIB_NAME} ${FSFW_ETL_LIB_MAJOR_VERSION} QUIET)
@ -191,7 +200,7 @@ find_package(${FSFW_ETL_LIB_NAME} ${FSFW_ETL_LIB_MAJOR_VERSION} QUIET)
if(NOT ${FSFW_ETL_LIB_NAME}_FOUND) if(NOT ${FSFW_ETL_LIB_NAME}_FOUND)
message( message(
STATUS STATUS
"No ETL installation was found with find_package. Installing and providing " "${MSG_PREFIX} No ETL installation was found with find_package. Installing and providing "
"etl with FindPackage") "etl with FindPackage")
include(FetchContent) include(FetchContent)