Skip to content

Commit

Permalink
(#6848) add platform.equality/0.0.1
Browse files Browse the repository at this point in the history
* Added platform.interfaces package

* Small rework architecture

* Move platform-interfaces to platfrom.interfaces

* Delete recipes/platform-interfaces directory

* Other small fixes

* Added empty line

* Fix register error

* Fixed version for new release

* Fixed version for new release

* Update to [0.1.0]

* [0.1.1] - is main version

* Added  platform.interfaces test_package

* Update to 0.1.2 version

* Update to 0.1.2 version

* fixed errors in the test_package.cpp 

[for update pull request]

* Removing empty line in the CMakeListst.txt

[partial commits]

* Removing empty line in the config.yml

[partial commits]

* Removing empty line problems

* Fixed validating c++ standard

* Added apple clang validation and fixes VS version

* I believe in Python

* conanfile reviewing

- Fixed source-function: used shorter one syntax for get sources
- Added required conan version [>=1.33.0]

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Update recipes/platform.interfaces/all/conanfile.py

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Cancel change name

* Add platform.delegates 0.1.2

* Add platform.delegates 0.1.2
update conanfile.py

* Resolving merge

* Update CMakeLists.txt

* Update test_package.cpp

* Update config.yml

* Oh no. since C++20

* Add platform.delegates 0.1.3

* Update config.yml

* Added unknown compiler warning

* Update recipes/platform.delegates/all/test_package/test_package.cpp

Co-authored-by: Uilian Ries <uilianries@gmail.com>

* Internal cpp sources

* Update recipes/platform.delegates/all/conanfile.py

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Update conanfile.py

* Update recipes/platform.delegates/all/conanfile.py

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Update recipes/platform.delegates/all/conanfile.py

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Remove package_info

* Add only-developers packages versions

* Revert "Add only-developers packages versions"

This reverts commit 9c61391

* add platform.equality/0.0.1

* Apply suggestions from code review

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Use snake_case

* Fix bug with None value

* Use simplified test_package

* Ugh, end line

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
  • Loading branch information
5 people authored Aug 16, 2021
1 parent 26837bb commit 6a83685
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/platform.equality/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"0.0.1":
url: https://github.com/linksplatform/Equality/archive/refs/tags/0.0.1.zip
sha256: 84c363152ab7eef69a9d72a1aebcfabcd63fc889efce591350ec56ddec544981
66 changes: 66 additions & 0 deletions recipes/platform.equality/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.33.0"


class PlatformInterfacesConan(ConanFile):
name = "platform.equality"
license = "LGPL-3.0-or-later"
homepage = "https://github.com/linksplatform/Equality"
url = "https://github.com/conan-io/conan-center-index"
description = "platform.delegates is one of the libraries of the LinksPlatform modular framework, " \
"which uses innovations from the C++20 standard, for slow parody any typing dictionary and others."
topics = ("linksplatform", "cpp20", "equality", "ranges", "any", "header-only")
settings = "compiler"
no_copy_source = True

@property
def _source_subfolder(self):
return "source_subfolder"

@property
def _internal_cpp_subfolder(self):
return os.path.join(self._source_subfolder, "cpp", "Platform.Equality")

@property
def _compilers_minimum_version(self):
return {
"gcc": "10",
"Visual Studio": "16",
"clang": "11",
"apple-clang": "11"
}

@property
def _minimum_cpp_standard(self):
return 20

def validate(self):
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler))

if not minimum_version:
self.output.warn("{} recipe lacks information about the {} compiler support.".format(
self.name, self.settings.compiler))

elif tools.Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration("platform.equality/{} "
"requires C++{} with {}, "
"which is not supported "
"by {} {}.".format(
self.version, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler,
self.settings.compiler.version))

if self.settings.compiler.get_safe("cppstd"):
tools.check_min_cppstd(self, self._minimum_cpp_standard)

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)

def package(self):
self.copy("*.h", dst="include", src=self._internal_cpp_subfolder)
self.copy("LICENSE", dst="licenses", src=self._source_subfolder)

def package_id(self):
self.info.header_only()
9 changes: 9 additions & 0 deletions recipes/platform.equality/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.8)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20)
17 changes: 17 additions & 0 deletions recipes/platform.equality/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from conans import ConanFile, CMake, tools
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"

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)
16 changes: 16 additions & 0 deletions recipes/platform.equality/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <Platform.Equality.h>

#include <any>
#include <iostream>

auto main() -> int {
boolalpha(std::cout);

#define eval(expr) #expr << ": " << (expr)

using std::any;
std::cout << eval(any(5) == any(5)) << std::endl;
std::cout << eval(any(5) == any(5u)) << std::endl;

#undef eval
}
3 changes: 3 additions & 0 deletions recipes/platform.equality/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"0.0.1":
folder: all

0 comments on commit 6a83685

Please sign in to comment.