I'm building aws_demos from amazon-freertos repository, and would like to get all the build commands including the link commands in this project. I'm building the project with 'Gnu Makefiles' generator and in order to do so I'm running the following command :
make -C build -Bn aws_demos VERBOSE=1
or even :
cmake --build build --target aws_demos --verbose -- -Bn
but both produce the same output which is missing the full link command, I only get the following in the console :
/usr/bin/cmake -E cmake_link_script CMakeFiles/aws_demos.dir/link.txt --verbose=1
/usr/bin/arm-none-eabi-objcopy -O ihex /home/sagi/amazon-freertos/build/aws_demos.elf /home/sagi/amazon-freertos/build/aws_demos.hex
/usr/bin/arm-none-eabi-size /home/sagi/amazon-freertos/build/aws_demos.elf
but when running only the following command :
(cd build && /usr/bin/cmake -E cmake_link_script CMakeFiles/aws_demos.dir/link.txt --verbose=1)
I get the whole link command :
/usr/bin/arm-none-eabi-gcc -g -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -Wl,-Map=output.map,--gc-sections,-zmuldefs -lm CMakeFiles/aws_demos.dir/vendors/st/boards/stm32l475_discovery/aws_demos/application_code/st_code/cmsis_os.c.obj CMakeFiles/aws_demos.dir/vendors/st/boards/stm32l475_discovery/aws_demos/application_code/st_code/entropy_hardware_poll.c.obj .....
truncated because it is too long.
deleting build/aws_demos.elf file and building again without the -Bn parameters to make output the whole link command, i.e. :
make -C build VERBOSE=1
[ 86%] Linking C executable aws_demos.elf
/usr/bin/cmake -E cmake_link_script CMakeFiles/aws_demos.dir/link.txt --verbose=1
/usr/bin/arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -Wl,-Map=output.map,--gc-sections,-zmuldefs -lm CMakeFiles/aws_demos.dir/vendors/st/boards/stm32l475_discovery/aws_demos/application_code/st_code/cmsis_os.c.obj
...
which means that in make dry-run mode the verbose parameter is being ignored in cmake_link_script
any idea how to get make/cmake to print this command as well ?