-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Pole 0.5 #25139
Open
luc-c
wants to merge
12
commits into
conan-io:master
Choose a base branch
from
luc-c:pole-0.5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,309
−0
Open
Pole 0.5 #25139
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c540f48
[Library] Add pole 0.6
lcrepin-dtk fb54775
test linter
lcrepin-dtk 5ef9e9a
test lint again
lcrepin-dtk be18dc6
some fixes
lcrepin-dtk e1a64a8
update recipe
lcrepin-dtk e01be91
restore file
lcrepin-dtk 1a44cac
update from pull request
lcrepin-dtk fc0cf97
remove useless file
lcrepin-dtk 96c5a5b
fix warning
lcrepin-dtk ffd1238
manage licence
lcrepin-dtk b2340ec
Update metadata
lcrepin-dtk 02aba07
fix url
lcrepin-dtk 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
Next
Next commit
[Library] Add pole 0.6
- Loading branch information
commit c540f48888f49a9e1a731cd2922ef78a3df971d7
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: | ||
"0.6": | ||
url: https://github.com/otofoto/Pole/archive/refs/heads/master.zip | ||
sha256: "aec798295fc9b48375b6dda7ca944fb71b18e96a1c2ed8345f9c7885cf91a5a9" |
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,64 @@ | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps | ||
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get | ||
from conan.tools.scm import Git | ||
|
||
|
||
|
||
class poleRecipe(ConanFile): | ||
name = "pole" | ||
package_type = "library" | ||
|
||
# Optional metadata | ||
license = "<Put the package license here>" | ||
author = "<Put your name here> <And your email here>" | ||
url = "<Package recipe repository url here, for issues about the package>" | ||
description = "<Description of pole package here>" | ||
topics = ("<Put some tag here>", "<here>", "<and here>") | ||
AbrilRBS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Binary configuration | ||
settings = "os", "compiler", "build_type", "arch" | ||
options = {"shared": [True, False], "fPIC": [True, False]} | ||
default_options = {"shared": False, "fPIC": True} | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": | ||
self.options.rm_safe("fPIC") | ||
|
||
def configure(self): | ||
if self.options.shared: | ||
self.options.rm_safe("fPIC") | ||
|
||
def export_sources(self): | ||
export_conandata_patches(self) | ||
AbrilRBS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
def source(self): | ||
git = Git(self) | ||
git.clone(url=self.conan_data["sources"][self.version]["url"], target=".") | ||
git.checkout(commit= self.conan_data["sources"][self.version]["revision"]) | ||
|
||
def layout(self): | ||
cmake_layout(self, src_folder="src") | ||
|
||
def generate(self): | ||
deps = CMakeDeps(self) | ||
deps.generate() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for this generator if there are no dependencies |
||
tc = CMakeToolchain(self) | ||
tc.generate() | ||
|
||
def build(self): | ||
apply_conandata_patches(self) | ||
AbrilRBS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def package(self): | ||
cmake = CMake(self) | ||
cmake.install() | ||
AbrilRBS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
def package_info(self): | ||
self.cpp_info.libs = ["pole"] | ||
|
||
|
||
|
||
|
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,9 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(test_package CXX) | ||
|
||
find_package(pole CONFIG REQUIRED) | ||
|
||
add_executable(${PROJECT_NAME} src/test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE pole::pole) | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) | ||
|
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,26 @@ | ||
import os | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMake, cmake_layout | ||
from conan.tools.build import can_run | ||
|
||
|
||
class poleTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "CMakeDeps", "CMakeToolchain" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def test(self): | ||
if can_run(self): | ||
cmd = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(cmd, 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <pole/pole.h> | ||
|
||
using namespace POLE; | ||
|
||
int main() { | ||
Storage aStorage("test.ole"); | ||
if( aStorage.open(true,true)) | ||
{ | ||
Stream sStream(&aStorage,"/test_stream", true); | ||
constexpr char[] acPoleStr = "POLE library trial"; | ||
sStream.write(acPoleStr, sizeof(acPoleStr)); | ||
sStream.flush(); | ||
} | ||
sStorage.close(); | ||
} |
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: | ||
"0.60": | ||
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.
Follow https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/cmake_package for what values to actually put here (Or use that template directly!), but author is not a field that should be added to a CCI recipe :)