1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 5project(littlefs) 6 7FILE(GLOB app_sources src/*.c) 8# LittleFS opens files for RW by default if no flags given and crashes, 9# instead of returning error when attempting to perform operation that 10# a file has not been opened for. 11target_compile_definitions(app PRIVATE 12 BYPASS_FS_OPEN_FLAGS_LFS_ASSERT_CRASH 13 BYPASS_FS_OPEN_FLAGS_LFS_RW_IS_DEFAULT 14) 15target_sources(app PRIVATE 16 ${app_sources} 17 ../common/test_fs_util.c 18 ../common/test_fs_open_flags.c 19 ../common/test_fs_dirops.c 20 ../common/test_fs_basic.c 21 ../common/test_fs_mount_flags.c 22 ../common/test_fs_mkfs.c 23) 24