Skip to content

Commit 0917daf

Browse files
authored
style: skip CMake formatting (#74)
* build(Format.cmake): set `FORMAT_SKIP_CMAKE` option to `ON` * style(cmake): adjust style in the `CMakeLists.txt` file * ci: remove install cmake-format step in the wofklow
1 parent 3193c49 commit 0917daf

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
- name: Checkout
2626
uses: actions/[email protected]
2727

28-
- name: Install cmake-format
29-
run: pip3 install cmake-format
30-
3128
- name: Configure project
3229
uses: threeal/[email protected]
3330
with:

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ project(
44
MyFibonacci
55
VERSION 0.0.0
66
DESCRIPTION "A starter C++ project for generating a Fibonacci sequence."
7-
HOMEPAGE_URL https://github.com/threeal/cpp-starter)
7+
HOMEPAGE_URL https://github.com/threeal/cpp-starter
8+
)
89

910
# Disable testing build if built as a subproject.
1011
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
1112
set(BUILD_TESTING OFF)
1213
endif()
1314

14-
file(DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.7/CPM.cmake
15-
${CMAKE_BINARY_DIR}/_deps/CPM.cmake EXPECTED_MD5 14ea07dfb484cad5db4ee1c75fd6a911)
15+
file(
16+
DOWNLOAD
17+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.7/CPM.cmake
18+
${CMAKE_BINARY_DIR}/_deps/CPM.cmake
19+
EXPECTED_MD5 14ea07dfb484cad5db4ee1c75fd6a911
20+
)
1621
include(${CMAKE_BINARY_DIR}/_deps/CPM.cmake)
1722
cpmusepackagelock(package-lock)
1823

package-lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ CPMDeclarePackage(Format.cmake
2121
GITHUB_REPOSITORY TheLartians/Format.cmake
2222
SYSTEM YES
2323
EXCLUDE_FROM_ALL YES
24+
OPTIONS
25+
"FORMAT_SKIP_CMAKE ON"
2426
)
2527
# Catch2
2628
CPMDeclarePackage(Catch2

0 commit comments

Comments
 (0)