code refactoring

This commit is contained in:
2025-02-16 19:32:01 +01:00
parent f3c2569a30
commit c8bda25d90
42 changed files with 439 additions and 543 deletions

View File

@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.10)
project(BoundaryScanExplorer)
# jtag_core must be the last linked archive for the application to compile
set(BS_MODULES jtag_core)
# script and jtag_core must be the last linked archive for the application to compile
set(BS_MODULES script jtag_core)
# We dive into submodules
file(GLOB MODULES_DIRS RELATIVE ${CMAKE_SOURCE_DIR}/modules ${CMAKE_SOURCE_DIR}/modules/*)
@@ -13,9 +13,11 @@ foreach(module ${MODULES_DIRS})
# checks if it is a sub-directory and if it contains a cmake file
if(IS_DIRECTORY ${module_path} AND EXISTS "${module_path}/CMakeLists.txt")
message(STATUS "Submodule : ${module}")
if(NOT ${module} STREQUAL jtag_core)
# already existing modules are not included in the list
if(NOT ${module} IN_LIST BS_MODULES)
list(APPEND BS_MODULES ${module})
endif()
# We'll compile the module
add_subdirectory(modules/${module})
else()
message(STATUS "Ignored : ${module}")