Skip to content

Instantly share code, notes, and snippets.

@wfxr
Last active April 19, 2017 11:01
Show Gist options
  • Save wfxr/7c1dde007b010afc0bca to your computer and use it in GitHub Desktop.
Save wfxr/7c1dde007b010afc0bca to your computer and use it in GitHub Desktop.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment