CMake 使用笔记

记录 CMake 相关知识。

Prelude:读文档一定要有耐心!

问题一 CLion: CMakeLists.txtset(CMAKE_CXX_FLAGS -Wall) 不起作用

Solution: 改用 target_compile_options(main PUBLIC -Wall)

Reference:
target_compile_options
GCC: Options to Request or Suppress Warnings
What is the modern method for setting general compile flags in CMake?

posted @ 2018-05-19 13:45  Pat  阅读(403)  评论(0编辑  收藏  举报