Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise CMake formatting #138

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cmake_minimum_required( VERSION 3.13.4 )
project(
toolchain-avr-gcc
LANGUAGES C CXX
)
)

list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" )
include( avrdude-utilities.cmake )
30 changes: 15 additions & 15 deletions avrdude-utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ function( add_avrdude_target target )
"CONFIGURATION_FILE;PORT;VERBOSITY"
"ARGUMENTS;DEPENDS"
${ARGN}
)
)

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

set( reset_arguments "" )
Expand Down Expand Up @@ -116,13 +116,13 @@ function( add_avrdude_target target )
COMMAND "${TOOLCHAIN_AVR_GCC_DIR}/utility/reset.py" ${reset_arguments}
COMMAND "${CMAKE_AVRDUDE}" ${avrdude_arguments}
DEPENDS ${add_avrdude_target_DEPENDS}
)
)
else( ${add_avrdude_target_RESET} )
add_custom_target(
"${target}"
COMMAND "${CMAKE_AVRDUDE}" ${avrdude_arguments}
DEPENDS ${add_avrdude_target_DEPENDS}
)
)
endif( ${add_avrdude_target_RESET} )
endfunction( add_avrdude_target target )

Expand Down Expand Up @@ -199,13 +199,13 @@ function( add_avrdude_programming_target executable target_postfix )
"CONFIGURATION_FILE;PORT;VERBOSITY"
"ARGUMENTS;OPERATIONS"
${ARGN}
)
)

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

if( ${add_avrdude_programming_target_RESET} )
Expand All @@ -225,7 +225,7 @@ function( add_avrdude_programming_target executable target_postfix )
PORT "${add_avrdude_programming_target_PORT}"
VERBOSITY "${add_avrdude_programming_target_VERBOSITY}"
ARGUMENTS ${add_avrdude_programming_target_ARGUMENTS} ${operations}
)
)
endfunction( add_avrdude_programming_target )

# Add avrdude flash programming targets for an executable.
Expand Down Expand Up @@ -295,13 +295,13 @@ function( add_avrdude_flash_programming_targets executable )
"CONFIGURATION_FILE;PORT;VERBOSITY"
"PROGRAM;VERIFY"
${ARGN}
)
)

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

if( ${add_avrdude_flash_programming_targets_RESET} )
Expand All @@ -317,7 +317,7 @@ function( add_avrdude_flash_programming_targets executable )
VERBOSITY "${add_avrdude_flash_programming_targets_VERBOSITY}"
OPERATIONS "flash:w"
ARGUMENTS ${add_avrdude_flash_programming_targets_PROGRAM}
)
)
add_avrdude_programming_target(
"${executable}"
"verify-flash"
Expand All @@ -327,7 +327,7 @@ function( add_avrdude_flash_programming_targets executable )
VERBOSITY "${add_avrdude_flash_programming_targets_VERBOSITY}"
OPERATIONS "flash:v"
ARGUMENTS ${add_avrdude_flash_programming_targets_VERIFY}
)
)
endfunction( add_avrdude_flash_programming_targets )

# Add avrdude EEPROM programming targets for an executable.
Expand Down Expand Up @@ -375,13 +375,13 @@ function( add_avrdude_eeprom_programming_targets executable )
"CONFIGURATION_FILE;PORT;VERBOSITY"
"PROGRAM;VERIFY"
${ARGN}
)
)

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

if( ${add_avrdude_eeprom_programming_targets_RESET} )
Expand All @@ -397,7 +397,7 @@ function( add_avrdude_eeprom_programming_targets executable )
VERBOSITY "${add_avrdude_eeprom_programming_targets_VERBOSITY}"
OPERATIONS "eeprom:w"
ARGUMENTS ${add_avrdude_eeprom_programming_targets_PROGRAM}
)
)
add_avrdude_programming_target(
"${executable}"
"verify-eeprom"
Expand All @@ -407,5 +407,5 @@ function( add_avrdude_eeprom_programming_targets executable )
VERBOSITY "${add_avrdude_eeprom_programming_targets_VERBOSITY}"
OPERATIONS "eeprom:v"
ARGUMENTS ${add_avrdude_eeprom_programming_targets_VERIFY}
)
)
endfunction( add_avrdude_eeprom_programming_targets )
2 changes: 1 addition & 1 deletion toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cmake_minimum_required( VERSION 3.13.4 )
mark_as_advanced(
CMAKE_TOOLCHAIN_FILE
CMAKE_INSTALL_PREFIX
)
)

set( CMAKE_SYSTEM_NAME "Generic" )
set( CMAKE_SYSTEM_PROCESSOR "Microchip-AVR" )
Expand Down