今天编译代码的时候遇到古怪的事情,在Cmakelists.txt中指定了编译版本,build的时候输出一句:
[cpptools] The build configurations generated do not contain the active build configuration. Using “Debug” for CMAKE_BUILD_TYPE instead of “Release” to ensure that IntelliSense configurations can be found
后来才发现:
Visual Studio Code左下角选的编译类型和Cmakelists中的类型不同
最后编译成什么版本,如果不运行完全判断不出来。
总结:编译代码请用脚本,不然谁知道下次编译了个什么鬼。。。。