-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
Environments like CLion bundle building tools and use them in CMake by setting the CMAKE_MAKE_PROGRAM
variable, but this variable is not propagated to subprojects by default. ELF2UF2 and PIOASM are subprojects of the Pico SDK and they are not configured to propagate CMAKE_MAKE_PROGRAM
. When the toolchain is not installed or not in the PATH, the build fails.
====================[ Build | blink | Debug ]===================================
"/Users/pedro/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/221.5921.27/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/pedro/repos/pico-examples/cmake-build-debug --target blink -j 3
[8/59] Performing configure step for 'ELF2UF2Build'
FAILED: blink/elf2uf2/src/ELF2UF2Build-stamp/ELF2UF2Build-configure /Users/pedro/repos/pico-examples/cmake-build-debug/blink/elf2uf2/src/ELF2UF2Build-stamp/ELF2UF2Build-configure
cd /Users/pedro/repos/pico-examples/cmake-build-debug/elf2uf2 && "/Users/pedro/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/221.5921.27/CLion.app/Contents/bin/cmake/mac/bin/cmake" -GNinja /Users/pedro/repos/pico-examples/cmake-build-debug/_deps/pico_sdk-src/tools/elf2uf2 && "/Users/pedro/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/221.5921.27/CLion.app/Contents/bin/cmake/mac/bin/cmake" -E touch /Users/pedro/repos/pico-examples/cmake-build-debug/blink/elf2uf2/src/ELF2UF2Build-stamp/ELF2UF2Build-configure
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/Users/pedro/repos/pico-examples/cmake-build-debug/elf2uf2/CMakeFiles/CMakeOutput.log".
[9/59] Generating bs2_default_padded_checksummed.S
ninja: build stopped: subcommand failed.
This is what happens when you try to build the blink example (https://github.com/raspberrypi/pico-examples/tree/master/blink) with CLion. It uses Ninja as the CMake Generator, but Ninja is not installed on the computer and it uses the version shipped with the IDE. But when the build process reaches ELF2UF2, it fails because CMAKE_MAKE_PROGRAM
is unset and Ninja is not in the PATH.
Metadata
Metadata
Assignees
Labels
No labels