-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 tllist #10763
Merged
Merged
Add tllist #10763
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f19207b
add tllist library
aacebedo 742c0c2
Simplify tllist recipe
uilianries 931ea6c
Add cmakelist
uilianries ba1128a
Update recipes/tllist/all/conanfile.py
danimtb a50d0a2
Update recipes/tllist/all/conanfile.py
danimtb 0669b55
Remove validate
danimtb ea45df8
Update recipes/tllist/all/conanfile.py
danimtb 27ff768
Update recipes/tllist/all/conanfile.py
danimtb 0328be0
Update recipes/tllist/all/conanfile.py
danimtb aef535d
Update recipes/tllist/all/conanfile.py
danimtb b8ee1d7
fix
danimtb a593934
commet
danimtb 96f16c7
fix import
danimtb ca861a5
fix import
danimtb 18eb642
Update recipes/tllist/all/conanfile.py
danimtb 0251bb4
Update recipes/tllist/all/conanfile.py
danimtb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sources: | ||
"1.0.5": | ||
url: "https://codeberg.org/dnkl/tllist/archive/1.0.5.tar.gz" | ||
sha256: b0f32c9b2c2015c8d8dd068fd4e8b586aa91ca1670badc274ec962559ee0aadd |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from conan import ConanFile | ||
from conans import tools | ||
from conans.errors import ConanInvalidConfiguration | ||
|
||
|
||
required_conan_version = ">=1.43.0" | ||
danimtb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class TllistConan(ConanFile): | ||
name = "tllist" | ||
license = "MIT" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://codeberg.org/dnkl/tllist" | ||
description = "A C header file only implementation of a typed linked list." | ||
topics = ("list", "utils", "typed-linked-list") | ||
settings = "os", "arch", "build_type", "compiler" | ||
no_copy_source = True | ||
|
||
@property | ||
def _source_subfolder(self): | ||
return "source_subfolder" | ||
|
||
danimtb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def validate(self): | ||
# tllist relies on __typeof__, not implemented in Visual Studio | ||
if self.settings.compiler == "Visual Studio": | ||
raise ConanInvalidConfiguration("Visual Studio compiler is not supported") | ||
|
||
def source(self): | ||
tools.get(**self.conan_data["sources"][self.version], | ||
destination=self._source_subfolder, strip_root=True) | ||
|
||
def package(self): | ||
self.copy("LICENSE", src=self._source_subfolder, dst="licenses") | ||
self.copy("*.h", src=self._source_subfolder, dst="include") | ||
|
||
def package_id(self): | ||
self.info.header_only() | ||
|
||
def package_info(self): | ||
danimtb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
self.cpp_info.set_property("pkg_config_name", "tllist") |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package C) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
find_package(tllist CONFIG REQUIRED) | ||
|
||
add_executable(${PROJECT_NAME} test_package.c) | ||
target_link_libraries(${PROJECT_NAME} tllist::tllist) |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake", "cmake_find_package_multi" | ||
|
||
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) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <stdlib.h> | ||
#include <tllist.h> | ||
|
||
int main(int argc, const char *const *argv) { | ||
tll(int) l = tll_init(); | ||
|
||
tll_push_back(l, 43); | ||
|
||
return EXIT_SUCCESS; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
"1.0.5": | ||
folder: "all" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the requirement in terms of conan version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/conan-io/conan/releases/tag/1.43.0 from 1.43.0
I am updating the required version right now 🏃 Thanks! 🦅 👁️