add option for external toolchain file

This commit is contained in:
Robin Müller 2022-04-20 00:57:37 +02:00
parent ec0a38ad25
commit c4220b37e5
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,10 @@ set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_HARDCODED_TOOLCHAIN_FILE "\
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
if a different toolchain file is set externally" ON
)
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
@ -41,7 +44,7 @@ include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config()
# Check whether the user has already installed Catch2 first. This has to come before
# the project call. We could also exlcude doing this when the Q7S primary OBSW is built..
# the project call. We could also exclude doing this when the Q7S primary OBSW is built..
find_package(Catch2 3 CONFIG QUIET)
# Project Name

View File

@ -11,7 +11,7 @@ endif()
# Disable compiler checks for cross-compiling.
if(FSFW_OSAL MATCHES linux AND TGT_BSP)
if(FSFW_OSAL MATCHES linux AND TGT_BSP AND NOT EIVE_HARDCODED_TOOLCHAIN_FILE)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/te0720-1cfa")
set(CMAKE_TOOLCHAIN_FILE
"${CMAKE_SCRIPT_PATH}/Zynq7020CrossCompileConfig.cmake"