Skip to content

Commit

Permalink
Adding cmake's conan.io support + appveyor's support for conan.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbarrette committed Feb 21, 2017
1 parent 28cd1d9 commit 4310322
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ else()
cmake_minimum_required(VERSION 3.0)
endif()

# Conan.io integration
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
endif()

set(CMAKE_CXX_STANDARD 11) # C++11...
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
Expand Down
19 changes: 15 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,38 @@ environment:
- PRJ_GEN: "Visual Studio 11 2012 Win64"
BDIR: msvc2012
PRJ_CFG: Release
PRJ_GEN_VERSION: 11
- PRJ_GEN: "Visual Studio 12 2013 Win64"
BDIR: msvc2013
PRJ_CFG: Release
PRJ_GEN_VERSION: 12
- PRJ_GEN: "Visual Studio 14 2015 Win64"
BDIR: msvc2015
PRJ_CFG: Release
PRJ_GEN_VERSION: 14
- PRJ_GEN: "Visual Studio 11 2012 Win64"
BDIR: msvc2012
PRJ_CFG: Release
PRJ_CFG: Debug
PRJ_GEN_VERSION: 11
- PRJ_GEN: "Visual Studio 12 2013 Win64"
BDIR: msvc2013
PRJ_CFG: Release
PRJ_CFG: Debug
PRJ_GEN_VERSION: 12
- PRJ_GEN: "Visual Studio 14 2015 Win64"
BDIR: msvc2015
PRJ_CFG: Release
PRJ_CFG: Debug
PRJ_GEN_VERSION: 14

install:
- cinst curl
- cmd: echo "Downloading conan..."
- cmd: set PATH=%PATH%;%PYTHON%/Scripts/
- cmd: pip.exe install conan
- cmd: conan user # Create the conan data directory
- cmd: conan --version

build_script:
- mkdir build.%BDIR%
- conan install --build -s compiler="Visual Studio" -s compiler.version=%PRJ_GEN_VERSION% .
- cd build.%BDIR%
- cmake .. -G"%PRJ_GEN%"
- cmake --build . --config %PRJ_CFG% --clean-first
Expand Down
5 changes: 5 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[requires]
libcurl/7.50.3@lasote/stable

[generators]
cmake

0 comments on commit 4310322

Please sign in to comment.