New in version 3.5.
Enable/Disable output of compile commands during generation.
This option is implemented only by Makefile Generators and the Ninja. It is ignored on other generators.
Makefile Generators
Borland Makefiles
MSYS Makefiles
MinGW Makefiles
NMake Makefiles
NMake Makefiles JOM
Unix Makefiles
Watcom WMake
打開 vs 的 console
可先手動打開,然后使用process hacker查看程序啟動的命令,就可以找到如下命令,可從控制台打開vs 的 console,不用手動打開:
cmd /k "C:\Program Files\Microsoft Visual Studio\xxxx\yyyy\VC\Auxiliary\Build\vcvars64.bat"
在打開的vs cosole中輸入:
cmake .. -G "NMake Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=1
生成compile_commands.json
