From 629717cd13730fa5f7543ce414ff11b5c175add0 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 4 May 2023 16:38:06 +0700 Subject: [PATCH] fix cmake build --- {cmake => examples/cmake}/cpu/cortex-m7.cmake | 0 {cmake => examples/cmake}/toolchain/arm_gcc.cmake | 0 {cmake => examples/cmake}/toolchain/set_flags.cmake | 0 hw/bsp/imxrt/family.cmake | 2 +- tools/build_family.py | 8 ++++---- 5 files changed, 5 insertions(+), 5 deletions(-) rename {cmake => examples/cmake}/cpu/cortex-m7.cmake (100%) rename {cmake => examples/cmake}/toolchain/arm_gcc.cmake (100%) rename {cmake => examples/cmake}/toolchain/set_flags.cmake (100%) diff --git a/cmake/cpu/cortex-m7.cmake b/examples/cmake/cpu/cortex-m7.cmake similarity index 100% rename from cmake/cpu/cortex-m7.cmake rename to examples/cmake/cpu/cortex-m7.cmake diff --git a/cmake/toolchain/arm_gcc.cmake b/examples/cmake/toolchain/arm_gcc.cmake similarity index 100% rename from cmake/toolchain/arm_gcc.cmake rename to examples/cmake/toolchain/arm_gcc.cmake diff --git a/cmake/toolchain/set_flags.cmake b/examples/cmake/toolchain/set_flags.cmake similarity index 100% rename from cmake/toolchain/set_flags.cmake rename to examples/cmake/toolchain/set_flags.cmake diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake index e36adaf5a..95c4c0415 100644 --- a/hw/bsp/imxrt/family.cmake +++ b/hw/bsp/imxrt/family.cmake @@ -1,6 +1,6 @@ # toolchain set up set(CMAKE_SYSTEM_PROCESSOR cortex-m7 CACHE INTERNAL "System Processor") -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../cmake/toolchain/arm_${TOOLCHAIN}.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/../../../examples/cmake/toolchain/arm_${TOOLCHAIN}.cmake) function(family_configure_target TARGET) if (NOT BOARD) diff --git a/tools/build_family.py b/tools/build_family.py index f9f7261fe..1fc25907b 100644 --- a/tools/build_family.py +++ b/tools/build_family.py @@ -41,11 +41,11 @@ if __name__ == '__main__': # If examples are not specified in arguments, build all all_examples = [] - for dir1 in os.scandir("examples"): - if dir1.is_dir() and 'cmake-build' not in dir1.name: - for entry in os.scandir(dir1.path): + for d in os.scandir("examples"): + if d.is_dir() and 'cmake-build' not in d.name and 'cmake' not in d.name: + for entry in os.scandir(d.path): if entry.is_dir(): - all_examples.append(dir1.name + '/' + entry.name) + all_examples.append(d.name + '/' + entry.name) filter_with_input(all_examples) all_examples.sort()