Skip to content

Commit

Permalink
Revise CMake formatting (#20)
Browse files Browse the repository at this point in the history
Resolves #19 (Revise CMake formatting).
  • Loading branch information
apcountryman authored Mar 27, 2024
1 parent f674cf8 commit 8c0dcc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ cmake_minimum_required( VERSION 3.16.3 )
project(
toolchain-arm-none-eabi-gcc
LANGUAGES C CXX
)
)

list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" )

include( openocd-utilities )
12 changes: 6 additions & 6 deletions openocd-utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ function( add_openocd_target target )
"DEBUG_LEVEL"
"COMMANDS;DEPENDS;FILES;SEARCH_PATH"
${ARGN}
)
)

if( DEFINED add_openocd_target_UNPARSED_ARGUMENTS )
message(
FATAL_ERROR
"'${add_openocd_target_UNPARSED_ARGUMENTS}' are not supported arguments"
)
)
endif( DEFINED add_openocd_target_UNPARSED_ARGUMENTS )

set( openocd_arguments "" )
Expand Down Expand Up @@ -129,7 +129,7 @@ function( add_openocd_target target )
COMMAND "${CMAKE_OPENOCD}" ${openocd_arguments}
DEPENDS ${add_openocd_target_DEPENDS}
VERBATIM
)
)
endfunction( add_openocd_target )

# Add OpenOCD flash programming target for an executable.
Expand Down Expand Up @@ -181,13 +181,13 @@ function( add_openocd_flash_programming_target executable )
"DEBUG_LEVEL"
"COMMANDS;FILES;SEARCH_PATH"
${ARGN}
)
)

if( DEFINED add_openocd_flash_programming_target_UNPARSED_ARGUMENTS )
message(
FATAL_ERROR
"'${add_openocd_flash_programming_target_UNPARSED_ARGUMENTS}' are not supported arguments"
)
)
endif( DEFINED add_openocd_flash_programming_target_UNPARSED_ARGUMENTS )

add_openocd_target(
Expand All @@ -201,5 +201,5 @@ function( add_openocd_flash_programming_target executable )
"telnet_port disabled"
"program ${executable} verify reset"
"shutdown"
)
)
endfunction( add_openocd_flash_programming_target )
2 changes: 1 addition & 1 deletion toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cmake_minimum_required( VERSION 3.16.3 )
mark_as_advanced(
CMAKE_TOOLCHAIN_FILE
CMAKE_INSTALL_PREFIX
)
)

set( CMAKE_SYSTEM_NAME "Generic" )
set( CMAKE_SYSTEM_PROCESSOR "Arm Cortex-M/Cortex-R" )
Expand Down

0 comments on commit 8c0dcc8

Please sign in to comment.