-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#22894) unleash-client-cpp: add version 1.3.0, support conan v2
* unleash-client-cpp: add version 1.3.0, support conan v2 * drop support clang with libc++ * drop support apple-clang with libc++ * include sstream in 1.1.1 * fix msvc version Co-authored-by: Martin Valgur <[email protected]> * Removed support for v1.1.1 and cleaned old conan 1 cruft * Update recipes/unleash-client-cpp/all/conandata.yml * Update recipes/unleash-client-cpp/config.yml --------- Co-authored-by: Martin Valgur <[email protected]> Co-authored-by: PerseoGI <[email protected]> Co-authored-by: Rubén Rincón Blanco <[email protected]>
- Loading branch information
1 parent
cf443f3
commit 1fc297a
Showing
8 changed files
with
59 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
sources: | ||
"1.1.1": | ||
url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.1.1.tar.gz" | ||
sha256: "2750dc231bf608910d4270ac39d83d46d25b88cc547a9d4d31f7ce4950effa7c" | ||
patches: | ||
"1.1.1": | ||
- patch_file: "patches/0001-no-conan-cmake.patch" | ||
base_path: "source_subfolder" | ||
"1.3.0": | ||
url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.3.0.tar.gz" | ||
sha256: "fa0b8d6101c6dbd08db23a3d353f386c17e9436a63d658f88c7d0b8619b8d501" |
This file contains 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
11 changes: 0 additions & 11 deletions
11
recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
project(test_package LANGUAGES CXX) | ||
|
||
find_package(unleash CONFIG REQUIRED) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} unleash::unleash) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE unleash::unleash) | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import cmake_layout, CMake | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(bin_path, env="conanrun") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#include <cassert> | ||
#include <ios> | ||
#include <iostream> | ||
|
||
#include <unleash/unleashclient.h> | ||
|
||
int main() { | ||
unleash::UnleashClient unleashClient = unleash::UnleashClient::create("production", "https://www.apple.com/%"); | ||
unleashClient.initializeClient(); | ||
return unleashClient.isEnabled("feature.toogle"); | ||
|
||
std::cout << "feature.toggle - is enabled: " << std::boolalpha << unleashClient.isEnabled("feature.toogle") << '\n'; | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
versions: | ||
"1.1.1": | ||
"1.3.0": | ||
folder: all |