From 10c0d00e6d7bc85f1ae53dcec74d9252a8b689e6 Mon Sep 17 00:00:00 2001 From: zhangshoukui Date: Wed, 9 Oct 2024 15:33:41 +0800 Subject: [PATCH] Fix to compile parameters not taking effect When cmake version is greater than 3.18 https://cmake.org/cmake/help/latest/command/set_source_files_properties.html Signed-off-by: zhangshoukui --- fs/littlefs/CMakeLists.txt | 4 ++-- fs/romfs/CMakeLists.txt | 4 ++-- fs/rpmsgfs/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/littlefs/CMakeLists.txt b/fs/littlefs/CMakeLists.txt index 0d8b8696f3c..8c487497dda 100644 --- a/fs/littlefs/CMakeLists.txt +++ b/fs/littlefs/CMakeLists.txt @@ -54,7 +54,7 @@ if(CONFIG_FS_LITTLEFS) target_include_directories(fs PRIVATE ${CMAKE_CURRENT_LIST_DIR}) if(CONFIG_TRACE_LITTLEFS_FS) - set_source_files_properties(lfs_vfs.c PROPERTIES COMPILE_FLAGS - -finstrument-functions) + set_source_files_properties(lfs_vfs.c DIRECTORY .. + PROPERTIES COMPILE_FLAGS -finstrument-functions) endif() endif() diff --git a/fs/romfs/CMakeLists.txt b/fs/romfs/CMakeLists.txt index 97d472d7de5..eb326f508ff 100644 --- a/fs/romfs/CMakeLists.txt +++ b/fs/romfs/CMakeLists.txt @@ -23,8 +23,8 @@ if(CONFIG_FS_ROMFS) target_sources(fs PRIVATE fs_romfs.c fs_romfsutil.c) if(CONFIG_TRACE_ROMFS_FS) - set_source_files_properties(fs_romfs.c PROPERTIES COMPILE_FLAGS - -finstrument-functions) + set_source_files_properties(fs_romfs.c DIRECTORY .. + PROPERTIES COMPILE_FLAGS -finstrument-functions) endif() endif() diff --git a/fs/rpmsgfs/CMakeLists.txt b/fs/rpmsgfs/CMakeLists.txt index 968f58c0a4a..9789ee025ce 100644 --- a/fs/rpmsgfs/CMakeLists.txt +++ b/fs/rpmsgfs/CMakeLists.txt @@ -27,6 +27,6 @@ if(CONFIG_FS_RPMSGFS_SERVER) endif() if(CONFIG_TRACE_RPMSGFS_FS) - set_source_files_properties(rpmsgfs.c PROPERTIES COMPILE_FLAGS - -finstrument-functions) + set_source_files_properties(rpmsgfs.c DIRECTORY .. + PROPERTIES COMPILE_FLAGS -finstrument-functions) endif()