Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verbose NMake Makefiles using CMake

Tags:

cmake

nmake

I have been following instructions from the FAQ: Is there an option to produce more 'verbose' compiling?. I have now:

$ cat C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows.cmake
[...]
# uncomment these out to debug nmake and borland makefiles
set(CMAKE_START_TEMP_FILE "")
set(CMAKE_END_TEMP_FILE "")
set(CMAKE_VERBOSE_MAKEFILE 1)

I then regenerate my project, and run nmake:

> cmake --version
cmake version 2.8.12.2

> cmake -G"NMake Makefiles" ..\project
> nmake VERBOSE=1
[...]
[ 73%] Building CXX object apps/foobar/CMakeFiles/bla.dir/my.cpp.obj
    cd C:\Dashboards\MyTests\project-build-debug-vista32-nightly\apps\foobar
    C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe  @C:\Users\voxxl\AppData\Local\Temp\nm1362.tmp

Is there a way to have access to the full cl command line ?

like image 389
malat Avatar asked May 09 '14 09:05

malat


1 Answers

On Windows (XP or greater), Command lines are limited in length to 8,191 bytes.

Windows compiler toolsets get around this by allowing the @filepath syntax on the command line.

So VERBOSE=1 is less useful on Windows. But you can always check command line in generated *.make files

For example (path used from question):

apps/foobar/CMakeFiles/bla.dir/build.make apps/foobar/CMakeFiles/bla.dir/flags.make

like image 160
Sergei Nikulov Avatar answered Oct 16 '22 09:10

Sergei Nikulov