vec-iree: Make the springbok BSP configurable Change-Id: Ice747f014edcbf7835315a2d5e7a010e05ea64fe
diff --git a/CMakeLists.txt b/CMakeLists.txt index ad2c355..2a3b606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -18,6 +18,7 @@ set(STACK_SIZE "10K" CACHE STRING "Stack size (default: 10K)") add_link_options("LINKER:--defsym=__stack_size__=${STACK_SIZE}") set(SPRINGBOK_LINKER_SCRIPT "$ENV{ROOTDIR}/sw/vec/springbok/matcha.ld" CACHE PATH "Springbok linker script path (default: matcha.ld)") +set(BUILD_WITH_SPRINGBOK ON CACHE BOOL "Build the target with springbok BSP (default: ON)") add_subdirectory($ENV{ROOTDIR}/sw/vec/springbok springbok) #------------------------------------------------------------------------------- @@ -43,7 +44,13 @@ add_definitions(-DIREE_USER_CONFIG_H="${SPRINGBOK_CONFIG_HEADER}") endif() -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv_springbok.cmake) +# Springbok BSPrelated setting +if(${BUILD_WITH_SPRINGBOK}) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv_springbok.cmake) +else() + # Add the LOG_X header file for build compatibility. + include_directories($ENV{ROOTDIR}/sw/vec/springbok/include) +endif() # Build IREE runtime libraries. add_subdirectory($ENV{ROOTDIR}/toolchain/iree iree)