Skip to content

Commit

Permalink
Add Conan support
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrehn committed Jul 8, 2018
1 parent 213c116 commit 5445ce9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
conanbuildinfo.cmake
conanbuildinfo.txt
conaninfo.txt
.vscode
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Enable all compiler warnings
# Enable all relevant compiler warnings
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2 /MD")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()

# If we are using the Conan CMake generator, include the generated file
if(EXISTS "${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake")
include("${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake")
conan_basic_setup()
endif()

# Locate the Boost headers
find_package(Boost 1.64 REQUIRED)
include_directories(${Boost_INCLUDE_DIRS} SYSTEM)
Expand Down
8 changes: 8 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[requires]
boost/1.67.0@conan/stable

[generators]
cmake

[options]
boost:header_only=True

0 comments on commit 5445ce9

Please sign in to comment.