wfxr
11/23/2015 - 5:19 PM

cmake-learning.md

See http://blog.csdn.net/wzzfeitian/article/details/40963457

简单的示例

cmake_minimum_required (VERSION 3.1.0)
project (Hello)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++")

find_package(Boost REQUIRED)

add_executable (hello hello.cpp)
target_link_libraries(hello pthread)

添加宏定义

# 禁用下标为字符型的警告
add_definitions(-Wno-char-subscripts)