Set CMAKE_MAKE_PROGRAM when building ELF2UF2 and PIOASM (#935)

This commit is contained in:
Pedro Tôrres 2022-10-16 19:31:58 -03:00 committed by GitHub
parent 587ac803c5
commit 2d4e3baa82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -24,8 +24,10 @@ if (NOT ELF2UF2_FOUND)
if (NOT TARGET ${ELF2UF2_BUILD_TARGET}) if (NOT TARGET ${ELF2UF2_BUILD_TARGET})
pico_message_debug("ELF2UF2 will need to be built") pico_message_debug("ELF2UF2 will need to be built")
ExternalProject_Add(${ELF2UF2_BUILD_TARGET} ExternalProject_Add(${ELF2UF2_BUILD_TARGET}
PREFIX elf2uf2 SOURCE_DIR ${ELF2UF2_SOURCE_DIR} PREFIX elf2uf2
SOURCE_DIR ${ELF2UF2_SOURCE_DIR}
BINARY_DIR ${ELF2UF2_BINARY_DIR} BINARY_DIR ${ELF2UF2_BINARY_DIR}
CMAKE_ARGS "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}"
BUILD_ALWAYS 1 # force dependency checking BUILD_ALWAYS 1 # force dependency checking
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )

View File

@ -25,11 +25,13 @@ if (NOT Pioasm_FOUND)
pico_message_debug("PIOASM will need to be built") pico_message_debug("PIOASM will need to be built")
# message("Adding external project ${PioasmBuild_Target} in ${CMAKE_CURRENT_LIST_DIR}}") # message("Adding external project ${PioasmBuild_Target} in ${CMAKE_CURRENT_LIST_DIR}}")
ExternalProject_Add(${PioasmBuild_TARGET} ExternalProject_Add(${PioasmBuild_TARGET}
PREFIX pioasm SOURCE_DIR ${PIOASM_SOURCE_DIR} PREFIX pioasm
SOURCE_DIR ${PIOASM_SOURCE_DIR}
BINARY_DIR ${PIOASM_BINARY_DIR} BINARY_DIR ${PIOASM_BINARY_DIR}
CMAKE_ARGS "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}"
CMAKE_CACHE_ARGS "-DPIOASM_EXTRA_SOURCE_FILES:STRING=${PIOASM_EXTRA_SOURCE_FILES}"
BUILD_ALWAYS 1 # force dependency checking BUILD_ALWAYS 1 # force dependency checking
INSTALL_COMMAND "" INSTALL_COMMAND ""
CMAKE_CACHE_ARGS "-DPIOASM_EXTRA_SOURCE_FILES:STRING=${PIOASM_EXTRA_SOURCE_FILES}"
) )
endif() endif()