Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yumetodo/3515d60ff3743d57ac58 to your computer and use it in GitHub Desktop.
Save yumetodo/3515d60ff3743d57ac58 to your computer and use it in GitHub Desktop.
Boost.asioの付属サンプル、cpp11/buffers/reference_counted.cppをCMakeするもの。CMakelists.txtとリネームしてcppと同じパスに置いてください
cmake_minimum_required(VERSION 2.8.4)
project(buffers)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/bin")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(SOURCE_FILES reference_counted.cpp)
find_package(Boost 1.59.0 COMPONENTS system)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_INCLUDE_DIRS}/stage/lib)
add_executable(buffers ${SOURCE_FILES})
add_definitions(-D_WIN32_WINNT=0x0601)
target_link_libraries(buffers ${Boost_LIBRARIES})
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment