From 57d1d953c8718357fc7b9bbd37dd2950ff17e980 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 31 Mar 2022 12:09:28 +0200 Subject: [PATCH] Removed GCC path hack on NV14 as well --- radio/src/targets/nv14/CMakeLists.txt | 50 ++++++--------------------- 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/radio/src/targets/nv14/CMakeLists.txt b/radio/src/targets/nv14/CMakeLists.txt index 2c3e2b079..0661c56ae 100644 --- a/radio/src/targets/nv14/CMakeLists.txt +++ b/radio/src/targets/nv14/CMakeLists.txt @@ -182,51 +182,21 @@ set(STM32LIB_SRC STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c ) -MACRO(GET_GCC_INCLUDE_PATH gcc_include_path) - if (WIN32) - execute_process(COMMAND arm-none-eabi-gcc -v -x c -E NUL ERROR_VARIABLE _gcc_output OUTPUT_QUIET) - else() - execute_process(COMMAND arm-none-eabi-gcc -v -x c -E - INPUT_FILE /dev/null ERROR_VARIABLE _gcc_output OUTPUT_QUIET) - endif() - - # Build an array of string from the GCC output - string(REPLACE "\n" ";" _gcc_output "${_gcc_output}") - - set(_capture_include FALSE) - set(_include_path "") - - # Go through the lines and capture between '"#include <...> search starts here:"' and 'End of search list.' - foreach(_line ${_gcc_output}) - if(${_line} STREQUAL "End of search list.") - set(_capture_include FALSE) - endif() - - if(_capture_include) - # Remove the leading and trailing empty characters - string(REPLACE "\r" "" _line ${_line}) - string(SUBSTRING "${_line}" 1 -1 _line) - set(_include_path "${_include_path}" "-I\"${_line}\"") - endif() - - if(${_line} STREQUAL "#include <...> search starts here:") - set(_capture_include TRUE) - endif() - endforeach() - set(${gcc_include_path} ${_include_path}) -ENDMACRO() - if(PYTHONINTERP_FOUND) - GET_GCC_INCLUDE_PATH(gcc_include_path) - add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp WORKING_DIRECTORY ${RADIO_DIRECTORY}/src - COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs_private.h -DPCBFLYSKY -DPCBNV14 -DCPUARM -DSTM32F4 -DSTM32F429_439xx -DCOLORLCD -DBACKUP -DSIMU -I. -Igui/colorlcd -Itargets/nv14 -Itargets/common/arm/stm32 -I${THIRDPARTY_DIR} -I${THIRDPARTY_DIR}/libopenui/src -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/Include ${gcc_include_path} -Wno-asm-operand-widths -Wno-pragma-once-outside-header ${SYSROOT_ARG} > ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp + COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs_private.h + -DPCBFLYSKY -DPCBNV14 -DCPUARM -DSTM32F4 -DSTM32F429_439xx -DCOLORLCD -DBACKUP -DSIMU + -I. -Igui/colorlcd -Itargets/nv14 -Itargets/common/arm/stm32 + -I${THIRDPARTY_DIR} -I${THIRDPARTY_DIR}/libopenui/src + -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/STM32F4xx_StdPeriph_Driver/inc + -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include + -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/Include + -Wno-asm-operand-widths -Wno-pragma-once-outside-header ${SYSROOT_ARG} + > ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp DEPENDS ${RADIO_DIRECTORY}/src/datastructs.h ${RADIO_DIRECTORY}/util/generate_datacopy.py ) - - add_custom_target(datacopy - DEPENDS ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp - ) + add_custom_target(datacopy DEPENDS ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp) endif()