cmake nuttx copy with rsync

This commit is contained in:
Daniel Agar 2016-05-05 22:30:56 -04:00 committed by Lorenz Meier
parent 0afcfd9fab
commit 5da9e7e653
1 changed files with 3 additions and 12 deletions

View File

@ -213,11 +213,11 @@ function(px4_nuttx_add_export)
endif()
# copy and export
file(RELATIVE_PATH nuttx_cp_src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/NuttX)
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
COMMAND ${MKDIR} -p ${nuttx_src}
COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/
COMMAND ${RM} -rf ${nuttx_src}/.git
COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/
#COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
@ -227,6 +227,7 @@ function(px4_nuttx_add_export)
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
DEPENDS ${config_files} ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Building NuttX for ${CONFIG}")
# extract
@ -438,16 +439,6 @@ function(px4_os_add_flags)
set(added_exe_linker_flags) # none currently
set(instrument_flags)
if ("${config_nuttx_hw_stack_check_${BOARD}}" STREQUAL "y")
set(instrument_flags
-finstrument-functions
-ffixed-r10
)
list(APPEND c_flags ${instrument_flags})
list(APPEND cxx_flags ${instrument_flags})
endif()
set(cpu_flags)
if (${BOARD} STREQUAL "px4fmu-v1")
set(cpu_flags