I am trying build project via CMake, few days earlier this process worked fine, but today I am getting error after command cmake -G "NMake Makefiles" ..
:
CMake Error at CMakeLists.txt:8 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the specified file
-- Configuring incomplete, errors occurred!
I am using Visual Studio Code, name of project folder is "ADC_read", and my CMakeLists.txt file is:
# Set minimum required version of CMake
cmake_minimum_required(VERSION 3.12)
# Include build functions from Pico SDK
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# Set name of project (as PROJECT_NAME) and C/C standards
project(ADC_read C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Creates a pico-sdk subdirectory in our project for the libraries
pico_sdk_init()
# Tell CMake where to find the executable source file
add_executable(${PROJECT_NAME}
main.c
)
# Create map/bin/hex/uf2 files
pico_add_extra_outputs(${PROJECT_NAME})
# Link to pico_stdlib (gpio, time, etc. functions)
target_link_libraries(${PROJECT_NAME}
pico_stdlib adc_read hardware_adc
)
# Enable usb output, disable uart output
pico_enable_stdio_usb(${PROJECT_NAME} 1)
pico_enable_stdio_uart(${PROJECT_NAME} 0)
Anyone know where could be problem?
==========================% EDIT %=============================== Semisolved...
So I am still not able to build project from Visual Studio Code (VSC can´t find nmake
), but building from VS command prompt works fine, so I will stick with this.