Skip to content

Commit

Permalink
(#15409) simdjson: add version 3.1.0, remove older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
toge committed Jan 26, 2023
1 parent 87093dd commit 8810cd3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 34 deletions.
15 changes: 3 additions & 12 deletions recipes/simdjson/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.1.0":
url: "https://github.com/simdjson/simdjson/archive/refs/tags/3.1.0.tar.gz"
sha256: "14d17ba7139d27c1e1bf01e765f5c26e84cc9e9be6a316c977638e01c7de85fa"
"3.0.1":
url: "https://github.com/simdjson/simdjson/archive/v3.0.1.tar.gz"
sha256: "156b1bc5eb0561b2bd166b46d191fd3d95a3e709cc63761477d3b7aec2b6e9ed"
Expand All @@ -8,24 +11,12 @@ sources:
"2.2.3":
url: "https://github.com/simdjson/simdjson/archive/v2.2.3.tar.gz"
sha256: "4c62f2d82edec3dbc63650c10453dc471de9f1be689eb5b4bde89efed89db5d8"
"2.2.2":
url: "https://github.com/simdjson/simdjson/archive/v2.2.2.tar.gz"
sha256: "b0e36beab240bd827c1103b4c66672491595930067871e20946d67b07758c010"
"2.2.0":
url: "https://github.com/simdjson/simdjson/archive/v2.2.0.tar.gz"
sha256: "011974352049e986bdcdf64fc807cf3ab901865240f4ae8e3de670dd42aab099"
"2.1.0":
url: "https://github.com/simdjson/simdjson/archive/v2.1.0.tar.gz"
sha256: "051b90427ddd1eac319f4eb34b973592728a6d8608fbac61e8aaa5a2dee4b693"
"2.0.4":
url: "https://github.com/simdjson/simdjson/archive/v2.0.4.tar.gz"
sha256: "c8a12cf60f6ce8c0e556f68bd80e7bd9f11f5876e198ed3637da8ccf182eaa24"
"2.0.3":
url: "https://github.com/simdjson/simdjson/archive/v2.0.3.tar.gz"
sha256: "c1bcf65b3bd830bf8f747b8dd7126edd4bb7562bebb92698c1750acf4c979df6"
"2.0.1":
url: "https://github.com/simdjson/simdjson/archive/v2.0.1.tar.gz"
sha256: "581e508210614a5024edf79e0b65db943ab5711cc42163826bcbf3df6a5e34d1"
"1.1.0":
url: "https://github.com/simdjson/simdjson/archive/v1.1.0.tar.gz"
sha256: "9effcb21fe48e4bcc9b96031e60c3911c58aa656ad8c78212d269c0db9e0133e"
Expand Down
16 changes: 8 additions & 8 deletions recipes/simdjson/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from conan.tools.scm import Version
import os

required_conan_version = ">=1.50.2 <1.51.0 || >=1.51.2"
required_conan_version = ">=1.53"


class SimdjsonConan(ConanFile):
Expand All @@ -33,9 +33,9 @@ class SimdjsonConan(ConanFile):
@property
def _compilers_minimum_version(self):
return {
# In simdjson/2.0.1, several AVX-512 instructions are not support by GCC < 9.0
"gcc": "8" if Version(self.version) != "2.0.1" else "9",
"gcc": "8",
"Visual Studio": "16",
"msvc": "192",
"clang": "6",
"apple-clang": "9.4",
}
Expand All @@ -46,7 +46,7 @@ def config_options(self):

def configure(self):
if self.options.shared:
del self.options.fPIC
self.options.rm_safe("fPIC")

def validate(self):
if self.info.settings.compiler.cppstd:
Expand All @@ -60,17 +60,17 @@ def loose_lt_semver(v1, v2):

minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False)
if not minimum_version:
self.output.warn("{} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name))
self.output.warn(f"{self.ref} requires C++17. Your compiler is unknown. Assuming it supports C++17.")
elif loose_lt_semver(str(self.info.settings.compiler.version), minimum_version):
raise ConanInvalidConfiguration("{} requires C++17, which your compiler does not fully support.".format(self.name))
raise ConanInvalidConfiguration(f"{self.ref} requires C++17, which your compiler does not fully support.")

if Version(self.version) >= "2.0.0" and \
self.info.settings.compiler == "gcc" and \
Version(self.info.settings.compiler.version).major == "9":
if self.settings.compiler.get_safe("libcxx") == "libstdc++11":
raise ConanInvalidConfiguration("{}/{} doesn't support GCC 9 with libstdc++11.".format(self.name, self.version))
raise ConanInvalidConfiguration(f"{self.ref} doesn't support GCC 9 with libstdc++11.")
if self.info.settings.build_type == "Debug":
raise ConanInvalidConfiguration("{}/{} doesn't support GCC 9 with Debug build type.".format(self.name, self.version))
raise ConanInvalidConfiguration(f"{self.ref} doesn't support GCC 9 with Debug build type.")

def layout(self):
cmake_layout(self, src_folder="src")
Expand Down
9 changes: 3 additions & 6 deletions recipes/simdjson/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
cmake_minimum_required(VERSION 3.8)
project(test_package LANGUAGES CXX)
project(test_package)

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

find_package(simdjson REQUIRED CONFIG)

add_executable(${PROJECT_NAME} ../test_package/test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE simdjson::simdjson)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
10 changes: 2 additions & 8 deletions recipes/simdjson/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
versions:
"3.1.0":
folder: all
"3.0.1":
folder: all
"3.0.0":
folder: all
"2.2.3":
folder: all
"2.2.2":
folder: all
"2.2.0":
folder: all
"2.1.0":
folder: all
"2.0.4":
folder: all
"2.0.3":
folder: all
"2.0.1":
folder: all
"1.1.0":
folder: all
"1.0.2":
Expand Down

0 comments on commit 8810cd3

Please sign in to comment.