Skip to content

Commit

Permalink
Merge pull request #1403 from qchateau/packio-1.2.0
Browse files Browse the repository at this point in the history
packio: add version 1.2.0
  • Loading branch information
danimtb authored Apr 22, 2020
2 parents 95fd0b3 + faf4371 commit 2b1db8e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
4 changes: 4 additions & 0 deletions recipes/packio/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ sources:
"1.1.1":
sha256: 5f77bcbb843cc7dd7731c37db586e9e4f3997ebf04a8d1eccb9eae21841c7e55
url: https://github.com/qchateau/packio/archive/1.1.1.tar.gz
"1.2.0":
sha256: b459c50a2ae7b90b45cd99a727dcd133e48602634571378491533148e642c511
url: https://github.com/qchateau/packio/archive/1.2.0.tar.gz

File renamed without changes.
13 changes: 13 additions & 0 deletions recipes/packio/all/test_package/1.2.x.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <packio/packio.h>

namespace ip = boost::asio::ip;

int main(int, char **) {
boost::asio::io_context io;

ip::tcp::endpoint bind_ep{ip::make_address("127.0.0.1"), 0};
auto server = packio::make_server(ip::tcp::acceptor{io, bind_ep});
auto client = packio::make_client(ip::tcp::socket{io});

return 0;
}
11 changes: 8 additions & 3 deletions recipes/packio/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ project(TestPackage CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

add_executable(basic basic.cpp)
target_link_libraries(basic ${CONAN_LIBS})
set_property(TARGET basic PROPERTY CXX_STANDARD 17)
if (PACKIO_VERSION VERSION_LESS "1.2.0")
add_executable(main 1.0.x-1.1.x.cpp)
else ()
add_executable(main 1.2.x.cpp)
endif ()

target_link_libraries(main ${CONAN_LIBS})
set_property(TARGET main PROPERTY CXX_STANDARD 17)
5 changes: 3 additions & 2 deletions recipes/packio/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ class TestPackageConan(ConanFile):
generators = "cmake"

def build(self):
packio_version = self.deps_cpp_info["packio"].version
cmake = CMake(self)
cmake.configure()
cmake.configure(defs={"PACKIO_VERSION": packio_version})
cmake.build()

def test(self):
if not tools.cross_building(self.settings):
self.run(os.path.join("bin", "basic"), run_environment=True)
self.run(os.path.join("bin", "main"), run_environment=True)
2 changes: 2 additions & 0 deletions recipes/packio/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ versions:
folder: all
"1.1.1":
folder: all
"1.2.0":
folder: all

0 comments on commit 2b1db8e

Please sign in to comment.