问题描述
我一直按照常见问题解答中的说明操作:是否有选项产生更多冗长的编译?我现在有:
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)
然后重新生成我的项目,并运行nmake:
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
有一种方法可以访问完整的 cl
命令行?
Is there a way to have access to the full cl
command line ?
推荐答案
在Windows(XP或更高版本)上,命令行的长度限制为8,191字节。
On Windows (XP or greater), Command lines are limited in length to 8,191 bytes.
Windows编译器工具集通过在命令行中允许@filepath语法来解决这个问题。
Windows compiler toolsets get around this by allowing the @filepath syntax on the command line.
所以VERBOSE = 1在Windows上不太有用。但是您可以随时在生成的* .make文件中检查命令行
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
这篇关于Verbose NMake Makefile使用CMake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!