Buildsystem (idf.py) - add custom command
Posted: Thu Jul 30, 2020 7:05 am
Hi,
I would like to add custom command for generating a source file, and added the following to main/CMakeLists.txt
add_custom_command(OUTPUT version.c
COMMAND ../tools/get_version.py > version.c
DEPENDS ../.git/HEAD ../.git/index
COMMENT Generates version.c from Git version
)
But I get the error:
xtensa-esp32-elf-gcc: error: ../main/version.c: No such file or directory
Tool:
ESP-IDF: release-4.0
Buildsystem: "New" idf.py based
Br,
Benny
I would like to add custom command for generating a source file, and added the following to main/CMakeLists.txt
add_custom_command(OUTPUT version.c
COMMAND ../tools/get_version.py > version.c
DEPENDS ../.git/HEAD ../.git/index
COMMENT Generates version.c from Git version
)
But I get the error:
xtensa-esp32-elf-gcc: error: ../main/version.c: No such file or directory
Tool:
ESP-IDF: release-4.0
Buildsystem: "New" idf.py based
Br,
Benny