Created
August 1, 2017 01:13
-
-
Save eduardoaugustojulio/2287c23cf853bdeab4bd7032f191833d to your computer and use it in GitHub Desktop.
cmake template with c++11 and boost support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
project(project CXX) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
find_package(Boost 1.40.0 COMPONENTS filesystem system REQUIRED) | |
file(GLOB SOURCE_FILES src/*.cpp) | |
add_executable(${PROJECT_NAME} ${SOURCE_FILES}) | |
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}) | |
install(TARGETS ${PROJECT_NAME} DESTINATION bin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Folder organization
To build, run inside folder the following command
~/project/build/$cmake ..