From a69ab0c23a0c38e3fed3e412df36538d8959d23c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 13 Nov 2018 21:53:22 -0800 Subject: cmake: Update coding style to use lowercase commands Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!) --- firmware/usrp2/usrp2p/bootloader/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'firmware/usrp2/usrp2p/bootloader') diff --git a/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt b/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt index 07f234302..86a3b0e5c 100644 --- a/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt +++ b/firmware/usrp2/usrp2p/bootloader/CMakeLists.txt @@ -16,27 +16,27 @@ # ######################################################################## -INCLUDE(FindPythonInterp) +include(FindPythonInterp) -MACRO(GEN_RMI target) - GET_FILENAME_COMPONENT(name ${target} NAME_WE) +macro(GEN_RMI target) + get_filename_component(name ${target} NAME_WE) #command to create a rmi from elf - ADD_CUSTOM_COMMAND( + add_custom_command( OUTPUT ${name}.rmi DEPENDS ${name}.bin COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/bin/bin_to_ram_macro_init.py ${name}.bin ${name}.rmi ) #add a top level target for output files - ADD_CUSTOM_TARGET( + add_custom_target( ${name}_rmi ALL DEPENDS ${name}.rmi ) -ENDMACRO(GEN_RMI) +endmacro(GEN_RMI) ######################################################################## -ADD_EXECUTABLE(bootloader.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c) -ADD_DEFINITIONS(-DUSRP2P) -ADD_DEFINITIONS(-DBOOTLOADER) -TARGET_LINK_LIBRARIES(bootloader.elf libusrp2pfw) -SET(GEN_OUTPUTS_BIN_SIZE 0x3fff) +add_executable(bootloader.elf ${CMAKE_SOURCE_DIR}/apps/txrx_uhd.c) +add_definitions(-DUSRP2P) +add_definitions(-DBOOTLOADER) +target_link_libraries(bootloader.elf libusrp2pfw) +set(GEN_OUTPUTS_BIN_SIZE 0x3fff) GEN_OUTPUTS(bootloader.elf) GEN_RMI(bootloader.bin) -- cgit v1.2.3