From 52b190f2e5039d4c759ef98048acce4cf3763872 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 22 Dec 2023 11:44:58 +0700 Subject: [PATCH 1/3] build: set Format.cmake with `FORMAT_SKIP_CMAKE ON` option --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5e55be..2589c1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,11 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) option(BUILD_DOCS "Enable documentations build" OFF) # Import Format.cmake to format source code - cpmaddpackage("gh:threeal/Format.cmake#auto-install-cmake-format") + cpmaddpackage( + GITHUB_REPOSITORY threeal/Format.cmake + GIT_TAG auto-install-cmake-format + OPTIONS "FORMAT_SKIP_CMAKE ON" + ) if(BUILD_TESTING) enable_testing() From 15526f0dc5d3138fe1260d9876145b3bbb7844f7 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 22 Dec 2023 11:46:32 +0700 Subject: [PATCH 2/3] build: use `TheLartians/Format.cmake` back --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2589c1e..5bdc156 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,8 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) # Import Format.cmake to format source code cpmaddpackage( - GITHUB_REPOSITORY threeal/Format.cmake - GIT_TAG auto-install-cmake-format + GITHUB_REPOSITORY TheLartians/Format.cmake + VERSION 1.8.0 OPTIONS "FORMAT_SKIP_CMAKE ON" ) From 9382c7d6d68c4be5984a7b9c953768dbbfb9aeca Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 22 Dec 2023 11:50:03 +0700 Subject: [PATCH 3/3] chore: remove unused `.cmake-format` config file --- .cmake-format | 4 ---- .gitignore | 1 - 2 files changed, 5 deletions(-) delete mode 100644 .cmake-format diff --git a/.cmake-format b/.cmake-format deleted file mode 100644 index a6b2f16..0000000 --- a/.cmake-format +++ /dev/null @@ -1,4 +0,0 @@ -{ - "line_width": 120, - "max_subgroups_hwrap": 3 -} diff --git a/.gitignore b/.gitignore index ee3c7e0..fbf036d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .* !.clang* -!.cmake* !.git* build