From c6cde3ba02dcf23662c0052a0cc8257016e11382 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Mon, 29 Jan 2018 12:09:42 +0300 Subject: [PATCH 01/37] Reorganize / simplify cmakefiles.txt --- CMakeLists.txt | 79 +++-------------------------------------- examples/CMakeLists.txt | 16 ++++++--- t/CMakeLists.txt | 78 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 79 deletions(-) create mode 100644 t/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index fa8fdff7..f6a7d689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,81 +62,10 @@ include_directories(${bredis_SOURCE_DIR}/include ${Boost_INCLUDE_DIRS}) MESSAGE(STATUS "boost inc: " ${Boost_INCLUDE_DIRS}) MESSAGE(STATUS "boost libs: " ${Boost_LIBRARIES}) -add_library(catch_lib t/tests-main.cpp) - -if(WIN32) - set(Boost_USE_MULTITHREADED ON) - set(LINK_DEPENDENCIES ${Boost_LIBRARIES} catch_lib) - add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0501) -else() - set(LINK_DEPENDENCIES pthread ${Boost_LIBRARIES} catch_lib) -endif() - +# ASIO maintenance is lagging behind the rest of boost, see +# https://github.com/chriskohlhoff/asio/pull/200 for one of the proposed patches. +set(DISABLE_COROUTINES true) +add_subdirectory(t) add_subdirectory(examples) -add_executable(t-05-protocol t/05-protocol.cpp) -target_link_libraries(t-05-protocol ${LINK_DEPENDENCIES}) -add_test("t-05-protocol" t-05-protocol) - -add_executable(t-06-fragmented-buffer t/06-fragmented-buffer.cpp) -target_link_libraries(t-06-fragmented-buffer ${LINK_DEPENDENCIES}) -add_test("t-06-fragmented-buffer" t-06-fragmented-buffer) - -add_executable(t-07-extract t/07-extract.cpp) -target_link_libraries(t-07-extract ${LINK_DEPENDENCIES}) -add_test("t-07-extract" t-07-extract) - -add_executable(t-08-markers t/08-markers.cpp) -target_link_libraries(t-08-markers ${LINK_DEPENDENCIES}) -add_test("t-07-extract" t-08-markers) - -add_executable(t-10-ping t/10-ping.cpp) -target_link_libraries(t-10-ping ${LINK_DEPENDENCIES}) -add_test("t-10-ping" t-10-ping) - -add_executable(t-11-multi-ping t/11-multi-ping.cpp) -target_link_libraries(t-11-multi-ping ${LINK_DEPENDENCIES}) -add_test("t-11-multi-ping" t-11-multi-ping) - -add_executable(t-12-basic-types t/12-basic-types.cpp) -target_link_libraries(t-12-basic-types ${LINK_DEPENDENCIES}) -add_test("t-12-basic-types" t-12-basic-types) - -add_executable(t-13-protol-error t/13-protol-error.cpp) -target_link_libraries(t-13-protol-error ${LINK_DEPENDENCIES}) -add_test("t-13-protol-error" t-13-protol-error) - -if(NOT WIN32) -add_executable(t-14-uds t/14-uds.cpp) -target_link_libraries(t-14-uds ${LINK_DEPENDENCIES}) -add_test("t-14-uds" t-14-uds) -endif() - -add_executable(t-15-cancellation t/15-cancellation.cpp) -target_link_libraries(t-15-cancellation ${LINK_DEPENDENCIES}) -add_test("t-15-cancellation" t-15-cancellation) - -add_executable(t-16-close-connection t/16-close-connection.cpp) -target_link_libraries(t-16-close-connection ${LINK_DEPENDENCIES}) -add_test("t-16-close-connection" t-16-close-connection) - -add_executable(t-17-sync t/17-sync.cpp) -target_link_libraries(t-17-sync ${LINK_DEPENDENCIES}) -add_test("t-17-sync" t-17-sync) - -add_executable(t-18-subscription t/18-subscription.cpp) -target_link_libraries(t-18-subscription ${LINK_DEPENDENCIES}) -add_test("t-18-subscription" t-18-subscription) - -add_executable(t-19-transaction t/19-transaction.cpp) -target_link_libraries(t-19-transaction ${LINK_DEPENDENCIES}) -add_test("t-19-transaction" t-19-transaction) - -add_executable(t-20-promise t/20-promise.cpp) -target_link_libraries(t-20-promise ${LINK_DEPENDENCIES}) -add_test("t-20-promise" t-20-promise) - -add_executable(t-21-coroutine t/21-coroutine.cpp) -target_link_libraries(t-21-coroutine ${LINK_DEPENDENCIES}) -add_test("t-21-coroutine" t-21-coroutine) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 55aeb09d..f8ca45b4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,8 +1,16 @@ -add_executable(stream-parse stream-parse.cpp) -target_link_libraries(stream-parse ${Boost_LIBRARIES}) +if(WIN32) + set(Boost_USE_MULTITHREADED ON) + set(LINK_DEPENDENCIES ${Boost_LIBRARIES} catch_lib) + add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0501) +endif() + +if(NOT DISABLE_COROUTINES) + add_executable(stream-parse stream-parse.cpp) + target_link_libraries(stream-parse ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +endif() add_executable(synch-subscription synch-subscription.cpp) -target_link_libraries(synch-subscription ${Boost_LIBRARIES}) +target_link_libraries(synch-subscription ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) add_executable(speed_test_async_multi speed_test_async_multi.cpp) -target_link_libraries(speed_test_async_multi ${Boost_LIBRARIES}) +target_link_libraries(speed_test_async_multi ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/t/CMakeLists.txt b/t/CMakeLists.txt new file mode 100644 index 00000000..2aec8b75 --- /dev/null +++ b/t/CMakeLists.txt @@ -0,0 +1,78 @@ +add_library(catch_lib tests-main.cpp) + +if(WIN32) + set(Boost_USE_MULTITHREADED ON) + set(LINK_DEPENDENCIES ${Boost_LIBRARIES} catch_lib) + add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0501) +else() + set(LINK_DEPENDENCIES ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} catch_lib) +endif() + + +add_executable(t-05-protocol 05-protocol.cpp) +target_link_libraries(t-05-protocol ${LINK_DEPENDENCIES}) +add_test("t-05-protocol" t-05-protocol) + +add_executable(t-06-fragmented-buffer 06-fragmented-buffer.cpp) +target_link_libraries(t-06-fragmented-buffer ${LINK_DEPENDENCIES}) +add_test("t-06-fragmented-buffer" t-06-fragmented-buffer) + +add_executable(t-07-extract 07-extract.cpp) +target_link_libraries(t-07-extract ${LINK_DEPENDENCIES}) +add_test("t-07-extract" t-07-extract) + +add_executable(t-08-markers 08-markers.cpp) +target_link_libraries(t-08-markers ${LINK_DEPENDENCIES}) +add_test("t-07-extract" t-08-markers) + +add_executable(t-10-ping 10-ping.cpp) +target_link_libraries(t-10-ping ${LINK_DEPENDENCIES}) +add_test("t-10-ping" t-10-ping) + +add_executable(t-11-multi-ping 11-multi-ping.cpp) +target_link_libraries(t-11-multi-ping ${LINK_DEPENDENCIES}) +add_test("t-11-multi-ping" t-11-multi-ping) + +add_executable(t-12-basic-types 12-basic-types.cpp) +target_link_libraries(t-12-basic-types ${LINK_DEPENDENCIES}) +add_test("t-12-basic-types" t-12-basic-types) + +add_executable(t-13-protol-error 13-protol-error.cpp) +target_link_libraries(t-13-protol-error ${LINK_DEPENDENCIES}) +add_test("t-13-protol-error" t-13-protol-error) + +if(NOT WIN32) + add_executable(t-14-uds 14-uds.cpp) + target_link_libraries(t-14-uds ${LINK_DEPENDENCIES}) + add_test("t-14-uds" t-14-uds) +endif() + +add_executable(t-15-cancellation 15-cancellation.cpp) +target_link_libraries(t-15-cancellation ${LINK_DEPENDENCIES}) +add_test("t-15-cancellation" t-15-cancellation) + +add_executable(t-16-close-connection 16-close-connection.cpp) +target_link_libraries(t-16-close-connection ${LINK_DEPENDENCIES}) +add_test("t-16-close-connection" t-16-close-connection) + +add_executable(t-17-sync 17-sync.cpp) +target_link_libraries(t-17-sync ${LINK_DEPENDENCIES}) +add_test("t-17-sync" t-17-sync) + +add_executable(t-18-subscription 18-subscription.cpp) +target_link_libraries(t-18-subscription ${LINK_DEPENDENCIES}) +add_test("t-18-subscription" t-18-subscription) + +add_executable(t-19-transaction 19-transaction.cpp) +target_link_libraries(t-19-transaction ${LINK_DEPENDENCIES}) +add_test("t-19-transaction" t-19-transaction) + +add_executable(t-20-promise 20-promise.cpp) +target_link_libraries(t-20-promise ${LINK_DEPENDENCIES}) +add_test("t-20-promise" t-20-promise) + +if(NOT DISABLE_COROUTINES) + add_executable(t-21-coroutine 21-coroutine.cpp) + target_link_libraries(t-21-coroutine ${LINK_DEPENDENCIES}) + add_test("t-21-coroutine" t-21-coroutine) +endif() From 0767bde5f5d451dc4e5d614d66aedbb7cbecce4b Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Tue, 30 Jan 2018 11:28:23 +0300 Subject: [PATCH 02/37] Use conan as package manager --- CMakeLists.txt | 23 ++++++++--------------- conanfile.txt | 40 ++++++++++++++++++++++++++++++++++++++++ t/CMakeLists.txt | 37 +++++++++++++++++++------------------ 3 files changed, 67 insertions(+), 33 deletions(-) create mode 100644 conanfile.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index f6a7d689..546fb50c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.0) project (bredis) +find_package (Threads) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -10,18 +12,8 @@ enable_testing() add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY) #add_definitions(-DBREDIS_DEBUG) -find_package( - Boost - COMPONENTS - chrono - coroutine - context - filesystem - regex - system - thread - REQUIRED -) +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage") @@ -58,9 +50,10 @@ if(CMAKE_COMPILER_IS_GNUCXX) ) endif() -include_directories(${bredis_SOURCE_DIR}/include ${Boost_INCLUDE_DIRS}) -MESSAGE(STATUS "boost inc: " ${Boost_INCLUDE_DIRS}) -MESSAGE(STATUS "boost libs: " ${Boost_LIBRARIES}) +include_directories(${bredis_SOURCE_DIR}/include) +#include_directories(${bredis_SOURCE_DIR}/include ${Boost_INCLUDE_DIRS}) +#MESSAGE(STATUS "boost inc: " ${Boost_INCLUDE_DIRS}) +#MESSAGE(STATUS "boost libs: " ${Boost_LIBRARIES}) # ASIO maintenance is lagging behind the rest of boost, see # https://github.com/chriskohlhoff/asio/pull/200 for one of the proposed patches. diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 00000000..91a8b8a8 --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,40 @@ +[requires] +boost/1.66.0@conan/stable +#Catch/1.9.6@bincrafters/stable + +[options] +boost:shared=True +# Note that a header-only build should be possible if we don't use coroutines +boost:header_only=False +boost:without_math=True +boost:without_wave=True +boost:without_container=True +boost:without_exception=True +boost:without_graph=True +boost:without_iostreams=True +boost:without_locale=True +boost:without_log=True +boost:without_program_options=True +boost:without_random=True +boost:without_regex=True +boost:without_mpi=True +boost:without_serialization=True +boost:without_signals=True +boost:without_coroutine=False +boost:without_fiber=True +boost:without_context=False +boost:without_timer=True +boost:without_thread=False +boost:without_chrono=True +boost:without_date_time=True +boost:without_atomic=True +boost:without_filesystem=True +boost:without_system=True +boost:without_graph_parallel=True +boost:without_python=True +boost:without_stacktrace=True +boost:without_test=True +boost:without_type_erasure=True + +[generators] +cmake diff --git a/t/CMakeLists.txt b/t/CMakeLists.txt index 2aec8b75..9a859e44 100644 --- a/t/CMakeLists.txt +++ b/t/CMakeLists.txt @@ -2,77 +2,78 @@ add_library(catch_lib tests-main.cpp) if(WIN32) set(Boost_USE_MULTITHREADED ON) - set(LINK_DEPENDENCIES ${Boost_LIBRARIES} catch_lib) + set(LINK_DEPENDENCIES ${CONAN_LIBS} catch_lib) add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0501) else() - set(LINK_DEPENDENCIES ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} catch_lib) + set(LINK_DEPENDENCIES ${CMAKE_THREAD_LIBS_INIT} ${CONAN_LIBS} catch_lib) endif() +MESSAGE(STATUS "RUNTIME_OUTPUT_DIRECTORY: " ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) add_executable(t-05-protocol 05-protocol.cpp) target_link_libraries(t-05-protocol ${LINK_DEPENDENCIES}) -add_test("t-05-protocol" t-05-protocol) +add_test("t-05-protocol" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-05-protocol") add_executable(t-06-fragmented-buffer 06-fragmented-buffer.cpp) target_link_libraries(t-06-fragmented-buffer ${LINK_DEPENDENCIES}) -add_test("t-06-fragmented-buffer" t-06-fragmented-buffer) +add_test("t-06-fragmented-buffer" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-06-fragmented-buffer") add_executable(t-07-extract 07-extract.cpp) target_link_libraries(t-07-extract ${LINK_DEPENDENCIES}) -add_test("t-07-extract" t-07-extract) +add_test("t-07-extract" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-07-extract") add_executable(t-08-markers 08-markers.cpp) target_link_libraries(t-08-markers ${LINK_DEPENDENCIES}) -add_test("t-07-extract" t-08-markers) +add_test("t-07-extract" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-08-markers") add_executable(t-10-ping 10-ping.cpp) target_link_libraries(t-10-ping ${LINK_DEPENDENCIES}) -add_test("t-10-ping" t-10-ping) +add_test("t-10-ping" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-10-ping") add_executable(t-11-multi-ping 11-multi-ping.cpp) target_link_libraries(t-11-multi-ping ${LINK_DEPENDENCIES}) -add_test("t-11-multi-ping" t-11-multi-ping) +add_test("t-11-multi-ping" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-11-multi-ping") add_executable(t-12-basic-types 12-basic-types.cpp) target_link_libraries(t-12-basic-types ${LINK_DEPENDENCIES}) -add_test("t-12-basic-types" t-12-basic-types) +add_test("t-12-basic-types" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-12-basic-types") add_executable(t-13-protol-error 13-protol-error.cpp) target_link_libraries(t-13-protol-error ${LINK_DEPENDENCIES}) -add_test("t-13-protol-error" t-13-protol-error) +add_test("t-13-protol-error" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-13-protol-error") if(NOT WIN32) add_executable(t-14-uds 14-uds.cpp) target_link_libraries(t-14-uds ${LINK_DEPENDENCIES}) - add_test("t-14-uds" t-14-uds) + add_test("t-14-uds" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-14-uds") endif() add_executable(t-15-cancellation 15-cancellation.cpp) target_link_libraries(t-15-cancellation ${LINK_DEPENDENCIES}) -add_test("t-15-cancellation" t-15-cancellation) +add_test("t-15-cancellation" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-15-cancellation") add_executable(t-16-close-connection 16-close-connection.cpp) target_link_libraries(t-16-close-connection ${LINK_DEPENDENCIES}) -add_test("t-16-close-connection" t-16-close-connection) +add_test("t-16-close-connection" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-16-close-connection") add_executable(t-17-sync 17-sync.cpp) target_link_libraries(t-17-sync ${LINK_DEPENDENCIES}) -add_test("t-17-sync" t-17-sync) +add_test("t-17-sync" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-17-sync") add_executable(t-18-subscription 18-subscription.cpp) target_link_libraries(t-18-subscription ${LINK_DEPENDENCIES}) -add_test("t-18-subscription" t-18-subscription) +add_test("t-18-subscription" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-18-subscription") add_executable(t-19-transaction 19-transaction.cpp) target_link_libraries(t-19-transaction ${LINK_DEPENDENCIES}) -add_test("t-19-transaction" t-19-transaction) +add_test("t-19-transaction" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-19-transaction") add_executable(t-20-promise 20-promise.cpp) target_link_libraries(t-20-promise ${LINK_DEPENDENCIES}) -add_test("t-20-promise" t-20-promise) +add_test("t-20-promise" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-20-promise") if(NOT DISABLE_COROUTINES) add_executable(t-21-coroutine 21-coroutine.cpp) target_link_libraries(t-21-coroutine ${LINK_DEPENDENCIES}) - add_test("t-21-coroutine" t-21-coroutine) + add_test("t-21-coroutine" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/t-21-coroutine") endif() From 069dab69763571d9e0685d47f84ab0754c6647bc Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Wed, 31 Jan 2018 11:28:18 +0300 Subject: [PATCH 03/37] conanfile.txt -> conanfile.py --- .gitignore | 1 + conanfile.py | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ conanfile.txt | 40 --------------------------- 3 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 .gitignore create mode 100644 conanfile.py delete mode 100644 conanfile.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 00000000..14c9be2a --- /dev/null +++ b/conanfile.py @@ -0,0 +1,76 @@ +from conans import ConanFile, CMake, tools + + +class BredisConan(ConanFile): + name = "bredis" + version = "0.05" + license = "" + url = "https://github.com/basiliscos/cpp-bredis" + description = "MIT" + settings = "os", "compiler", "build_type", "arch" + + requires = "boost/1.66.0@conan/stable" + default_options = ( + "boost:shared=True", + "boost:header_only=False", + "boost:without_math=True", + "boost:without_wave=True", + "boost:without_container=True", + "boost:without_exception=True", + "boost:without_graph=True", + "boost:without_iostreams=True", + "boost:without_locale=True", + "boost:without_log=True", + "boost:without_program_options=True", + "boost:without_random=True", + "boost:without_regex=True", + "boost:without_mpi=True", + "boost:without_serialization=True", + "boost:without_signals=True", + "boost:without_coroutine=False", + "boost:without_fiber=True", + "boost:without_context=False", + "boost:without_timer=True", + "boost:without_thread=False", + "boost:without_chrono=True", + "boost:without_date_time=True", + "boost:without_atomic=True", + "boost:without_filesystem=True", + "boost:without_system=True", + "boost:without_graph_parallel=True", + "boost:without_python=True", + "boost:without_stacktrace=True", + "boost:without_test=True", + "boost:without_type_erasure=True", + ) + + exports_sources = "include/*", "CMakeLists.txt", "examples/speed_test_async_multi.cpp" + no_copy_source = True + + + #default_options = "shared=False" + generators = "cmake" + # exports = "CMakeLists.txt", "include*", "examples*", "t*" + + # this is not building a library, just tests + def source(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + cmake.test() + # pass + ## self.run("git clone git@github.com:basiliscos/cpp-bredis.git") + ## self.run("cd cpp-bredis && git checkout issue-5") + + def build(self): + pass + + def package(self): + self.copy("*.hpp", dst="include", src="include") + self.copy("*.ipp", dst="include", src="include") + + def package_id(self): + self.info.header_only() + + #def package_info(self): + # self.cpp_info.libs = ["cpp-bredis"] diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index 91a8b8a8..00000000 --- a/conanfile.txt +++ /dev/null @@ -1,40 +0,0 @@ -[requires] -boost/1.66.0@conan/stable -#Catch/1.9.6@bincrafters/stable - -[options] -boost:shared=True -# Note that a header-only build should be possible if we don't use coroutines -boost:header_only=False -boost:without_math=True -boost:without_wave=True -boost:without_container=True -boost:without_exception=True -boost:without_graph=True -boost:without_iostreams=True -boost:without_locale=True -boost:without_log=True -boost:without_program_options=True -boost:without_random=True -boost:without_regex=True -boost:without_mpi=True -boost:without_serialization=True -boost:without_signals=True -boost:without_coroutine=False -boost:without_fiber=True -boost:without_context=False -boost:without_timer=True -boost:without_thread=False -boost:without_chrono=True -boost:without_date_time=True -boost:without_atomic=True -boost:without_filesystem=True -boost:without_system=True -boost:without_graph_parallel=True -boost:without_python=True -boost:without_stacktrace=True -boost:without_test=True -boost:without_type_erasure=True - -[generators] -cmake From d6738b42541b45cc762ea35f0e42e158949166c7 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Wed, 31 Jan 2018 12:24:09 +0300 Subject: [PATCH 04/37] Minor fixes --- conanfile.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/conanfile.py b/conanfile.py index 14c9be2a..5a7ab22b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -47,24 +47,15 @@ class BredisConan(ConanFile): exports_sources = "include/*", "CMakeLists.txt", "examples/speed_test_async_multi.cpp" no_copy_source = True - - #default_options = "shared=False" generators = "cmake" - # exports = "CMakeLists.txt", "include*", "examples*", "t*" + exports = "CMakeLists.txt", "include*", "examples*", "t*" # this is not building a library, just tests - def source(self): + def build(self): cmake = CMake(self) cmake.configure() cmake.build() cmake.test() - # pass - ## self.run("git clone git@github.com:basiliscos/cpp-bredis.git") - ## self.run("cd cpp-bredis && git checkout issue-5") - - def build(self): - pass - def package(self): self.copy("*.hpp", dst="include", src="include") self.copy("*.ipp", dst="include", src="include") From 6b8b2553d73bc673f0b98c6585b491459cd947ea Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 10:26:14 +0300 Subject: [PATCH 05/37] Try to build on travis with conan --- .travis.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index c50b1933..fe0f7f1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,13 @@ compiler: os: - linux -before_script: - - wget -q -O - http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz | tar -xz - - cd boost_1_64_0 && ./bootstrap.sh --with-libraries=coroutine,context,chrono,system,thread,regex,filesystem - - ./b2 --ignore-site-config && cd .. - - mkdir build - - cd build - - cmake -DBOOST_ROOT=`pwd`/../boost_1_64_0 .. +#before_script: +# - wget -q -O - http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz | tar -xz +# - cd boost_1_64_0 && ./bootstrap.sh --with-libraries=coroutine,context,chrono,system,thread,regex,filesystem +# - ./b2 --ignore-site-config && cd .. +# - mkdir build +# - cd build +# - cmake -DBOOST_ROOT=`pwd`/../boost_1_64_0 .. addons: apt: @@ -26,13 +26,17 @@ addons: - lcov script: - - $CXX --version - - make - - make test - - if [ "$CXX" == "g++-5" ]; then whereis gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi + #- $CXX --version + #- make + #- make test + #- if [ "$CXX" == "g++-5" ]; then whereis gcov-5; fi + #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi + - conan create user/channel install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi - - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi +# - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi +# - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi + - pip install conan + - conan user + From 0f31c1c3a146557e8eac75f8958dea5f2a650571 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 10:32:47 +0300 Subject: [PATCH 06/37] Another attempt --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe0f7f1e..e7f3c676 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ script: install: # - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi # - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi - - pip install conan + - sudo apt-get update -qq + - pip install --user conan - conan user From b6deda065d06845c23203f4f57ff2942ccc01210 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 10:41:48 +0300 Subject: [PATCH 07/37] update --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e7f3c676..5e099e42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,9 @@ script: #- make test #- if [ "$CXX" == "g++-5" ]; then whereis gcov-5; fi #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi - - conan create user/channel + #- conan create user/channel + - mkdir build && cd build + - conan install .. install: From a5db555918ecc95e9cb54ee04c28cf9b0c7374cd Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 10:48:11 +0300 Subject: [PATCH 08/37] update --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5e099e42..a3fcc27b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,5 +41,6 @@ install: # - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi - sudo apt-get update -qq - pip install --user conan + - conan remote add conan-community https://api.bintray.com/conan/conan-community/conan - conan user From 884e4db3ce08d2273811be400b2cd0846e6fae5c Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 10:54:55 +0300 Subject: [PATCH 09/37] --build missing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a3fcc27b..d562366f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ script: #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi #- conan create user/channel - mkdir build && cd build - - conan install .. + - conan install .. --build missing install: From 2ad7b89648e5f2409e226f27ce9be5c4e5a3f539 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 11:01:41 +0300 Subject: [PATCH 10/37] add actual building --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d562366f..dc038924 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ script: #- conan create user/channel - mkdir build && cd build - conan install .. --build missing + - cmake .. && cmake -build . && ctest install: From 205acff7429abace808a1ef19177ab7d3792c98f Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 11:09:22 +0300 Subject: [PATCH 11/37] Updat --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc038924..7b417a27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ script: #- conan create user/channel - mkdir build && cd build - conan install .. --build missing - - cmake .. && cmake -build . && ctest + - cmake .. && make && ctest install: From f1ff2efadb42c98978117804948cbd18d5864a0d Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 11:21:46 +0300 Subject: [PATCH 12/37] Update --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7b417a27..94fe56aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ script: #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi #- conan create user/channel - mkdir build && cd build + - if [ "$CXX" == "g++-5" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.0 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5.9; fi - conan install .. --build missing - cmake .. && make && ctest From 6288950ec91f89c8818334273c878530718e41af Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 11:33:16 +0300 Subject: [PATCH 13/37] Update --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94fe56aa..bcf4a085 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,14 +33,13 @@ script: #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi #- conan create user/channel - mkdir build && cd build - - if [ "$CXX" == "g++-5" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.0 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5.9; fi - conan install .. --build missing - cmake .. && make && ctest install: -# - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi -# - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi + - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi - sudo apt-get update -qq - pip install --user conan - conan remote add conan-community https://api.bintray.com/conan/conan-community/conan From 239d8fbf79d5d84dd76ab029842485694ad7c981 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:02:44 +0300 Subject: [PATCH 14/37] Try to support coverage --- .travis.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcf4a085..531e2f2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,6 @@ compiler: os: - linux -#before_script: -# - wget -q -O - http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz | tar -xz -# - cd boost_1_64_0 && ./bootstrap.sh --with-libraries=coroutine,context,chrono,system,thread,regex,filesystem -# - ./b2 --ignore-site-config && cd .. -# - mkdir build -# - cd build -# - cmake -DBOOST_ROOT=`pwd`/../boost_1_64_0 .. - addons: apt: sources: @@ -31,14 +23,15 @@ script: #- make test #- if [ "$CXX" == "g++-5" ]; then whereis gcov-5; fi #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi - #- conan create user/channel - mkdir build && cd build - conan install .. --build missing - cmake .. && make && ctest - + - if [ "$CXX" = "g++" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi + - if [ "$CXX" = "g++" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" = "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" fi - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi - sudo apt-get update -qq - pip install --user conan From 19c9e67ab573a0c393bca3f4e1c833fef2194ea4 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:09:05 +0300 Subject: [PATCH 15/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 531e2f2e..552bc0a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ script: - if [ "$CXX" = "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; fi - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi - sudo apt-get update -qq - pip install --user conan From d1a88de3d52e302c69b8e2eddb40a4fd51fb3ad3 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:23:38 +0300 Subject: [PATCH 16/37] Fix --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 552bc0a9..a3376ec1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,13 +26,13 @@ script: - mkdir build && cd build - conan install .. --build missing - cmake .. && make && ctest - - if [ "$CXX" = "g++" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" = "g++" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - - if [ "$CXX" = "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi + - if [ "$CXX" == "g++" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi + - if [ "$CXX" == "g++" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; fi - - if [ "$CXX" = "clang++" ]; then export CXX="clang++"; fi + - if [ "$CXX" == "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; fi + - if [ "$CXX" == "clang++" ]; then export CXX="clang++"; fi - sudo apt-get update -qq - pip install --user conan - conan remote add conan-community https://api.bintray.com/conan/conan-community/conan From cf460bb7edff0ac58986c21fff1eb7dab9194578 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:34:02 +0300 Subject: [PATCH 17/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a3376ec1..ab72f1a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ script: #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi - mkdir build && cd build - conan install .. --build missing - - cmake .. && make && ctest + - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - if [ "$CXX" == "g++" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi From 2a27ad91bb963869a76df4bea68f4a5403a3257c Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:44:05 +0300 Subject: [PATCH 18/37] Fix --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab72f1a5..2724575d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,9 @@ script: - mkdir build && cd build - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - - if [ "$CXX" == "g++" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - - if [ "$CXX" == "g++" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi + - if [ "$CXX" == "g++-5" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi + - if [ "$CXX" == "g++-5" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: - if [ "$CXX" == "g++" ]; then export CXX="g++-5"; export CC="gcc-5"; export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"; fi From 281a9f391dad339aaa3899f9ab2a11e0866ccd4a Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 12:54:15 +0300 Subject: [PATCH 19/37] Fix --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2724575d..4c31e821 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,8 @@ script: - mkdir build && cd build - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - - if [ "$CXX" == "g++-5" ]; then lcov-5 --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov-5 --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: From 3ca6dd3b4632ace2e1d3a71ed04ffa2fe7ce904b Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 13:04:37 +0300 Subject: [PATCH 20/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4c31e821..4070d765 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/t/*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'t-*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: From d0b794d67fe0afecea375a751e35c8d44d36f4ba Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Thu, 1 Feb 2018 13:17:30 +0300 Subject: [PATCH 21/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4070d765..c31c91f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'t-*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'0*'" "'1*'" "'2*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: From 2e2de3a56d569cd4ebe4a3f5c5ed858bb982e78e Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 12:24:01 +0300 Subject: [PATCH 22/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c31c91f2..60ced099 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'0*'" "'1*'" "'2*'" "'/boost_1_66_0/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/*.conan/*'" "'/usr/*'" "'/*/t/*'" --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: From 02399636d9c5f7453aadd0a0c994298924b65241 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 12:34:54 +0300 Subject: [PATCH 23/37] Fix --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 60ced099..d595454e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,8 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/*.conan/*'" "'/usr/*'" "'/*/t/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/*.conan/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then rm coverage.info; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi install: From b1065dab3a902ac25f779f370a5b9a13ad0f673e Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 12:36:20 +0300 Subject: [PATCH 24/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d595454e..4313956c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info "'/*.conan/*'" "'/usr/*'" --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info '/*.conan/*' '/usr/*' --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then rm coverage.info; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi From 2d541082b922d3a93602397eae764d0fe0600fbb Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 12:52:47 +0300 Subject: [PATCH 25/37] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4313956c..dc31c935 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest - if [ "$CXX" == "g++-5" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-5; fi - - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info '/*.conan/*' '/usr/*' --output-file coverage.info.cleaned; fi + - if [ "$CXX" == "g++-5" ]; then lcov --remove coverage.info '/*.conan/*' '/usr/*' '/*/t/*' --output-file coverage.info.cleaned; fi - if [ "$CXX" == "g++-5" ]; then rm coverage.info; fi - if [ "$CXX" == "g++-5" ]; then bash <(curl -s https://codecov.io/bash) -X gcov ; fi From 7ac95146a7e4cb679ed2fc319842fe544f6dcaea Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 13:12:22 +0300 Subject: [PATCH 26/37] Enable conan for app-veyor --- .travis.yml | 5 ----- appveyor.yml | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index dc31c935..50c48f3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,6 @@ addons: - lcov script: - #- $CXX --version - #- make - #- make test - #- if [ "$CXX" == "g++-5" ]; then whereis gcov-5; fi - #- if [ "$CXX" == "g++-5" ]; then make coverage VERBOSE=1; bash <(curl -s https://codecov.io/bash) -X gcov; fi - mkdir build && cd build - conan install .. --build missing - cmake .. && make VERBOSE=1 && ctest diff --git a/appveyor.yml b/appveyor.yml index c34c86e9..8f1711a7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,15 +14,18 @@ platform: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) environment: - BOOST_ROOT: "C:\\Libraries\\boost_1_64_0" +# BOOST_ROOT: "C:\\Libraries\\boost_1_64_0" # BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_64_0\\lib32-msvc-15.0" before_build: - cmake --version - - echo %BOOST_ROOT% - - dir "C:\Libraries" - - dir "%BOOST_ROOT%" + #- echo %BOOST_ROOT% + #- dir "C:\Libraries" + #- dir "%BOOST_ROOT%" + - cmd: set PATH=%PATH%;%PYTHON%/Scripts/ + - cmd: pip.exe install conan + - cmd: conan --version - ps: wget 'https://github.com/MSOpenTech/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip' -OutFile "Redis-x64-3.0.504.zip" - '@ECHO redis downloaded deployed' - dir @@ -31,15 +34,17 @@ before_build: # redis - set PATH=%APPVEYOR_BUILD_FOLDER%;%PATH% # boost - - set PATH=%BOOST_ROOT%\lib64-msvc-14.1;%PATH% + # - set PATH=%BOOST_ROOT%\lib64-msvc-14.1;%PATH% - echo %PATH% build_script: - - cmake -G "Visual Studio 15 2017 Win64" -H. -B_builds -DBOOST_ROOT="%BOOST_ROOT%" -# -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" - - cmake --build _builds + - cmd: mkdir build + - cmd: cd build + - cmd: conan install .. --build missing + - cmd: cmake ../ -G "Visual Studio 15 2017 Win64" + - cmd: cmake --build . --config Release test_script: - - ps: cd _builds + - ps: cd builds - ctest -VV -C "%CONFIG%" From fe2105e0477a6a016f31e5888084cb7b143ec9fc Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 13:15:45 +0300 Subject: [PATCH 27/37] Enable conan for app-veyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8f1711a7..f0daf647 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ platform: #on_finish: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) -environment: +#environment: # BOOST_ROOT: "C:\\Libraries\\boost_1_64_0" # BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_64_0\\lib32-msvc-15.0" From c380e74fa264276fd7ef6532a12b00ab1e126a35 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 13:31:05 +0300 Subject: [PATCH 28/37] Enable conan for app-veyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f0daf647..97f35d8b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ before_build: build_script: - cmd: mkdir build - cmd: cd build - - cmd: conan install .. --build missing + - cmd: conan install .. --build missing -o boost:without_filesystem=False - cmd: cmake ../ -G "Visual Studio 15 2017 Win64" - cmd: cmake --build . --config Release From 67930aaaea93f1b821da7fd2e8cc03067662dae9 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 13:42:19 +0300 Subject: [PATCH 29/37] Enable conan for app-veyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 97f35d8b..91de77a0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,6 +45,6 @@ build_script: - cmd: cmake --build . --config Release test_script: - - ps: cd builds +# - ps: cd builds - ctest -VV -C "%CONFIG%" From 447b86deb5c877add88eb0c7bcc38741ee43b9c5 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 14:01:59 +0300 Subject: [PATCH 30/37] Enable conan for app-veyor --- appveyor.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 91de77a0..81a5a643 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,12 +6,12 @@ platform: - Win32 #configuration: Release -# enable rdp -#init: -# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - -#on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + enable rdp +init: + - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +# +on_finish: + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) #environment: # BOOST_ROOT: "C:\\Libraries\\boost_1_64_0" @@ -46,5 +46,6 @@ build_script: test_script: # - ps: cd builds - - ctest -VV -C "%CONFIG%" + - dir + - ctest -VV -C "%CONFIG%" From 7d4e86c60f58ffd5c8c7d640526c2b0f6c30ed18 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 14:02:48 +0300 Subject: [PATCH 31/37] Enable conan for app-veyor --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 81a5a643..55d5d6f1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,10 +8,10 @@ platform: enable rdp init: - - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + - ps: "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" # on_finish: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + - ps: "$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" #environment: # BOOST_ROOT: "C:\\Libraries\\boost_1_64_0" From caed88fb9b239c2b93df4cf949a5159932382e17 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 14:03:16 +0300 Subject: [PATCH 32/37] Enable conan for app-veyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 55d5d6f1..c13e5f3d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ platform: - Win32 #configuration: Release - enable rdp +# enable rdp init: - ps: "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" # From 70904d4ad58b25f4b843b76aaf5d64fb64cfdc5e Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 14:12:19 +0300 Subject: [PATCH 33/37] Enable conan for app-veyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c13e5f3d..4d9b9c9d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ before_build: build_script: - cmd: mkdir build - cmd: cd build - - cmd: conan install .. --build missing -o boost:without_filesystem=False + - cmd: conan install .. --build missing -o boost:shared=False -o boost:without_filesystem=False - cmd: cmake ../ -G "Visual Studio 15 2017 Win64" - cmd: cmake --build . --config Release From 0efff5a65df58e1a3956ebc81cbeab4a56e28d67 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 16:15:37 +0300 Subject: [PATCH 34/37] Enable conan for app-veyor --- conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conanfile.py b/conanfile.py index 5a7ab22b..8b592801 100644 --- a/conanfile.py +++ b/conanfile.py @@ -63,5 +63,8 @@ def package(self): def package_id(self): self.info.header_only() + def imports(self): + self.copy("*", src="bin", dist="", ignore_case=True) + #def package_info(self): # self.cpp_info.libs = ["cpp-bredis"] From 2804e25dedd8b31ff5b4fc7ded667f158954be27 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 16:43:04 +0300 Subject: [PATCH 35/37] Enable conan for app-veyor --- appveyor.yml | 5 ++++- conanfile.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4d9b9c9d..4f8f4259 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,12 +40,15 @@ before_build: build_script: - cmd: mkdir build - cmd: cd build - - cmd: conan install .. --build missing -o boost:shared=False -o boost:without_filesystem=False + - cmd: conan install .. --build missing -o boost:shared=True -o boost:without_filesystem=False - cmd: cmake ../ -G "Visual Studio 15 2017 Win64" - cmd: cmake --build . --config Release test_script: # - ps: cd builds - dir + # copy boost dlls into bin folder + - conan imports .. + - cmd: cp ../redis-server.exe bin - ctest -VV -C "%CONFIG%" diff --git a/conanfile.py b/conanfile.py index 8b592801..cafbdaf6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -64,7 +64,7 @@ def package_id(self): self.info.header_only() def imports(self): - self.copy("*", src="bin", dist="", ignore_case=True) + self.copy("*.dll", src="bin", dist="bin", ignore_case=True) #def package_info(self): # self.cpp_info.libs = ["cpp-bredis"] From 20ea14b04ec09b4e1156e4ec0005a94b63aebae3 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 16:49:24 +0300 Subject: [PATCH 36/37] Enable conan for app-veyor --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index cafbdaf6..b2b90bfa 100644 --- a/conanfile.py +++ b/conanfile.py @@ -64,7 +64,7 @@ def package_id(self): self.info.header_only() def imports(self): - self.copy("*.dll", src="bin", dist="bin", ignore_case=True) + self.copy("*.dll", src="bin", dst="bin", ignore_case=True) #def package_info(self): # self.cpp_info.libs = ["cpp-bredis"] From 075df7357cf21e0fb53ee1f9c653214a3ee7da88 Mon Sep 17 00:00:00 2001 From: Ivan Baidakou Date: Sun, 4 Feb 2018 17:00:19 +0300 Subject: [PATCH 37/37] Enable conan for app-veyor --- appveyor.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4f8f4259..1001f469 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,11 +7,10 @@ platform: #configuration: Release # enable rdp -init: - - ps: "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" -# -on_finish: - - ps: "$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" +#init: +# - ps: "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" +#on_finish: +# - ps: "$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))" #environment: # BOOST_ROOT: "C:\\Libraries\\boost_1_64_0"