Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yoga version 3.0.2 #23019

Merged
merged 6 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions recipes/yoga/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
sources:
"3.0.2":
url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.2.tar.gz"
sha256: "73a81c51d9ceb5b95cd3abcafeb4c840041801d59f5048dacce91fbaab0cc6f9"
"2.0.1":
url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.1.tar.gz"
sha256: "4c80663b557027cdaa6a836cc087d735bb149b8ff27cbe8442fc5e09cec5ed92"
"2.0.0":
url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.0.tar.gz"
sha256: "29eaf05191dd857f76b6db97c77cce66db3c0067c88bd5e052909386ea66b8c5"
patches:
"3.0.2":
- patch_file: "patches/0001-delete-tests.patch"
patch_description: "Delete test targets from cmake"
patch_type: "conan"
"2.0.1":
- patch_file: "patches/0001-delete-tests.patch"
patch_description: "Delete test targets from cmake"
Expand Down
21 changes: 14 additions & 7 deletions recipes/yoga/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,22 @@ class YogaConan(ConanFile):

@property
def _min_cppstd(self):
return 14
return 20 if Version(self.version) >= "3.0.0" else 14

@property
def _compilers_minimum_version(self):
return {
"gcc": "5",
"clang": "3.4",
"apple-clang": "10",
}
if Version(self.version) >= "3.0.0":
return { # C++20 with bit_cast
"gcc": "11",
"clang": "14",
"apple-clang": "14"
}
else:
return {
"gcc": "5",
"clang": "3.4",
"apple-clang": "10",
}

def export_sources(self):
export_conandata_patches(self)
Expand All @@ -49,7 +56,7 @@ def layout(self):
def validate(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, self._min_cppstd)
check_min_vs(self, 191)
check_min_vs(self, 192 if Version(self.version) >= "3.0.0" else 191)
if not is_msvc(self):
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
Expand Down
5 changes: 1 addition & 4 deletions recipes/yoga/all/patches/0001-delete-tests.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4ce73cc..9f414127 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,6 @@ set(CMAKE_VERBOSE_MAKEFILE on)
@@ -10,4 +10,3 @@ set(CMAKE_VERBOSE_MAKEFILE on)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/project-defaults.cmake)

add_subdirectory(yoga)
-add_subdirectory(tests)
hedtke marked this conversation as resolved.
Show resolved Hide resolved

# cmake install config
include(GNUInstallDirs)
2 changes: 2 additions & 0 deletions recipes/yoga/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.0.2":
folder: all
"2.0.1":
folder: all
"2.0.0":
Expand Down
Loading