摘要:
技术经理说,可以用Cmake当中的add_custom_command,add_custom_target命令来使用。我初次研究了下,add_custom_command应该用官方文档中说明的第二种形式:The second signature adds a custom command to a target such as a library or executable. This is useful for performing an operation before or after building the target. The command becomes part of th 阅读全文
摘要:
Out of Source build呢,就是让Cmake产生的临时垃圾文件,不关乎于项目实际本身的文件放到一个目录里,一般我们把这个目录放在项目根目录(也可以认为是根CmakeLists.txt)下,取名为build。然后cd到build目录,cmake命令一下,注意Cmake命令的最后一个参数(路径参数),要写明: ../像这样:cmake -G"NMake Makefiles" ../Reference:http://stackoverflow.com/questions/9680420/looking-for-a-cmake-clean-command-to-cle 阅读全文