首页 文章

对于Cmake,您可以使用`add_compiler_flags()`命令修改发布/调试编译器标志吗?

提问于
浏览
3

add_compile_options() 的手册页中,我没有看到如何修改Release / Debug编译器标志 . Can you use add_compiler_options() to modify the Release/Debug compiler flags? If yes, how?

If no, is the recommended canonical method to modify the release/debug cmake variables[1] as described here ?

[1]即设置cmake变量CMAKE_ <LANG> FLAGS <TYPE>(对于lang c / c,它将是:CMAKE_CXX_FLAGS_RELEASE,CMAKE_CXX_FLAGS_DEBUG,CMAKE_C_FLAGS_RELEASE,CMAKE_C_FLAGS_DEBUG) .

1 回答

相关问题