[pim/kdepim-addons] /: Avoid duplicate entried (from rust element)

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f1048095726d66dcc168a9387db32ca4fcad679c by Laurent Montel.
Committed on 16/07/2026 at 18:17.
Pushed by mlaurent into branch 'master'.

Avoid duplicate entried (from rust element)

M  +16   -0    CMakeLists.txt

https://invent.kde.org/pim/kdepim-addons/-/commit/f1048095726d66dcc168a9387db32ca4fcad679c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3426c66be..d21f9a6a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,22 @@ file(
     kldap/*.h
 )
 
+set(_all_clang_format_source_files_normalized)
+foreach(_file IN LISTS ALL_CLANG_FORMAT_SOURCE_FILES)
+    get_filename_component(_full_file_path "${_file}" REALPATH)
+    string(
+        FIND "${_full_file_path}"
+        "${CMAKE_SOURCE_DIR}"
+        _source_idx
+    )
+    if(_source_idx EQUAL 0)
+        list(APPEND _all_clang_format_source_files_normalized "${_full_file_path}")
+    endif()
+endforeach()
+list(REMOVE_DUPLICATES _all_clang_format_source_files_normalized)
+set(ALL_CLANG_FORMAT_SOURCE_FILES ${_all_clang_format_source_files_normalized})
+unset(_all_clang_format_source_files_normalized)
+
 include(CheckFunctionExists)
 
 include(KDEInstallDirs)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.