ninja-build / ninja

a small build system with a focus on speed
https://ninja-build.org/
Apache License 2.0
11.08k stars 1.59k forks source link

Ninja on windows additional white lines #1272

Closed atsju closed 7 years ago

atsju commented 7 years ago

Cmake 3.7.2 Ninja 1.7.2

When building with ninja (I was used to Unix Makefiles) under windows any warning, error or command will add an additional whyte empty line

An example being clearer:

[37/139] Building C object CMakeFiles/outHexFile_Release_storage.c.obj
[38/139] Building C object CMakeFiles/outHexFile_Release.elf.dir/C_/.../systick.c.obj
C:\...systick.c: In function 'xxx_init':

C:\.....systick.c:38:9: warning: 'return' with a value, in function returning void

  return -1; //TODO JST unimplemented function

         ^

C:\...........

Notice there is no white line when the print is issued by ninja ([37/139], [38/139])

nico commented 7 years ago

Which compiler are you using?

atsju commented 7 years ago

Arm-none-eabi-gcc (version from 2016 q4 if y remember correctly) but I don't think the compiler is the cause. This line from build.ninja

build CMakeFiles/do_always: CUSTOM_COMMAND outHexFile_Debug_xxxxx_STM32L4_DEV.elf || outHexFile_Debug_xxxxx_STM32L4_DEV.elf
  COMMAND = cmd.exe /C "cd /D C:\SVN_AOS\cortex_firmwares\trunk\xxxxx\build && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo ------------------------------------------------------------------------------ && "C:\SVN_AOS\stm32_gcc_toolchain\GNU Tools ARM Embedded\6-2016-q4-major\bin\arm-none-eabi-size.exe" outHexFile_Debug_xxxxx_STM32L4_DEV.elf && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo Build configuration is Debug && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo APP_TYPE is xxxxx_STM32L4_DEV && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo ------------------------------------------------------------------------------"

outputs

[138/138] cmd.exe /C "cd /D C:\SVN_AOS\cortex_firmwares\trunk\xxxxx\build && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo ------------------------------------------------------------------------------ && "C:\SVN_AOS\stm32_gcc_toolchain\GNU Tools ARM Embedded\6-2016-q4-major\bin\arm-none-eabi-size.exe" outHexFile_Debug_xxxxx_STM32L4_DEV.elf && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo Build configuration is Debug && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo APP_TYPE is xxxxx_STM32L4_DEV && C:\SVN_AOS\stm32_gcc_toolchain\cmake-3.7.2-win32-x86\bin\cmake.exe -E echo ------------------------------------------------------------------------------"
------------------------------------------------------------------------------

   text    data     bss     dec     hex filename

  50160     256  110752  161168   27590 outHexFile_Debug_xxxxx_STM32L4_DEV.elf

Build configuration is Debug

APP_TYPE is xxxxx_STM32L4_DEV

------------------------------------------------------------------------------

and is not involving GCC

nico commented 7 years ago

Are you using the ninja binary from https://github.com/ninja-build/ninja/releases ? If not, did you build it under cygwin perchance?

atsju commented 7 years ago

Yes I am using the Windows binary from there

nico commented 7 years ago

I believe #1156 probably fixed this.