File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ SET(CMAKE_C_COMPILER_WORKS TRUE)
1212SET(CMAKE_CXX_COMPILER_WORKS TRUE)
1313
1414# force cmake compilers
15- SET(CMAKE_ASM_COMPILER "{{asm}}")
16- SET(CMAKE_C_COMPILER "{{cc}}")
17- SET(CMAKE_CXX_COMPILER "{{cxx}}")
18- SET(ELF2BIN "{{elf2bin}}")
15+ SET(CMAKE_ASM_COMPILER "${TOOLCHAIN_PATH}/{{asm}}")
16+ SET(CMAKE_C_COMPILER "${TOOLCHAIN_PATH}/{{cc}}")
17+ SET(CMAKE_CXX_COMPILER "${TOOLCHAIN_PATH}/{{cxx}}")
18+ SET(CMAKE_CPP_COMPILER "${TOOLCHAIN_PATH}/{{pp}}")
19+ SET(ELF2BIN "${TOOLCHAIN_PATH}/{{elf2bin}}")
1920{% if hex_files %}
2021SET(SREC_CAT "srec_cat")
2122{%- endif %}
@@ -60,7 +61,7 @@ TARGET_LINK_LIBRARIES({{name}} {{ld_sys_libs|join(" ")}})
6061
6162{% if pp -%}
6263add_custom_command(TARGET {{name}} PRE_LINK
63- COMMAND "{{pp} }" {{pp_flags}} {{linker_script}} -o ${CMAKE_CURRENT_BINARY_DIR}/{{name}}_pp.link_script.ld
64+ COMMAND "${CMAKE_CPP_COMPILER }" {{pp_flags}} {{linker_script}} -o ${CMAKE_CURRENT_BINARY_DIR}/{{name}}_pp.link_script.ld
6465 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
6566 BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/{{name}}_pp.link_script.ld"
6667 )
You can’t perform that action at this time.
0 commit comments