forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 191
eyalroz_printf: Add version 6.2.0 #725
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2f27d18
eyalroz_printf: Add version 6.2.0-b1
crvux 1e6b76d
eyalroz_printf: Fix MSVC build error
crvux d168936
eyalroz_printf: Remove unused imports from hunter.cmake
crvux 6724400
eyalroz_printf: Minor fixes
crvux a62b1c4
eyalroz_printf: Enhance example
crvux 79752d0
eyalroz_printf: Enhance docs
crvux 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 hidden or 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
This file contains hidden or 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,29 @@ | ||
| # Copyright (c) 2024 Eyal Rozenberg <eyalroz1@gmx.com> | ||
| # Copyright (c) 2024 Alexander Voronov <kab00m@ya.ru> | ||
| # All rights reserved. | ||
|
|
||
| # !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
|
||
| include(hunter_add_version) | ||
| include(hunter_cacheable) | ||
| include(hunter_cmake_args) | ||
| include(hunter_download) | ||
| include(hunter_pick_scheme) | ||
|
|
||
| hunter_add_version( | ||
| PACKAGE_NAME eyalroz_printf | ||
| VERSION "6.2.0" | ||
| URL "https://github.com/eyalroz/printf/archive/refs/tags/v6.2.0.zip" | ||
| SHA1 f60ce53b0d47e1ff0c4f54cd702a71eec362ffc6 | ||
| ) | ||
|
|
||
| hunter_cmake_args( | ||
| eyalroz_printf | ||
| CMAKE_ARGS | ||
| BUILD_TESTS=OFF | ||
| ) | ||
|
|
||
| hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
| hunter_cacheable(eyalroz_printf) | ||
| hunter_download(PACKAGE_NAME eyalroz_printf) | ||
|
|
||
This file contains hidden or 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,42 @@ | ||
| .. spelling:: | ||
|
|
||
| eyalroz | ||
| printf | ||
|
|
||
| .. index:: logging ; eyalroz_printf | ||
|
|
||
| .. _pkg.eyalroz_printf: | ||
|
|
||
| eyalroz_printf | ||
| ============== | ||
|
|
||
| - `Official <https://github.com/eyalroz/printf>`__ | ||
| - `Example <https://github.com/cpp-pm/hunter/blob/master/examples/eyalroz_printf/CMakeLists.txt>`__ | ||
| - Added by `Alexander Voronov <https://github.com/crvux>`__ (`pr-725 <https://github.com/cpp-pm/hunter/pull/725>`__) | ||
|
|
||
|
|
||
| .. literalinclude:: /../examples/eyalroz_printf/CMakeLists.txt | ||
| :language: cmake | ||
| :start-after: # DOCUMENTATION_START { | ||
| :end-before: # DOCUMENTATION_END } | ||
|
|
||
| CMake options | ||
| ------------- | ||
|
|
||
| The ``CMAKE_ARGS`` feature (see | ||
| `customization <https://hunter.readthedocs.io/en/latest/reference/user-modules/hunter_config.html>`__) | ||
| can be used to customize package: | ||
|
|
||
| - For example, to build static library: | ||
|
|
||
| .. code-block:: cmake | ||
|
|
||
| hunter_config( | ||
| eyalroz_printf | ||
| VERSION ${HUNTER_eyalroz_printf_VERSION} | ||
| CMAKE_ARGS | ||
| BUILD_SHARED_LIBS=OFF | ||
| ) | ||
|
|
||
| For more options see `original repository <https://github.com/eyalroz/printf/blob/master/CMakeLists.txt>`__. | ||
|
|
This file contains hidden or 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,22 @@ | ||
| # Copyright (c) 2024 Eyal Rozenberg <eyalroz1@gmx.com> | ||
| # Copyright (c) 2024 Alexander Voronov <kab00m@ya.ru> | ||
| # All rights reserved. | ||
|
|
||
| cmake_minimum_required(VERSION 3.5) | ||
|
|
||
| # Emulate HunterGate: | ||
| # * https://github.com/hunter-packages/gate | ||
| include("../common.cmake") | ||
|
|
||
| project(download-eyalroz_printf) | ||
|
|
||
| # DOCUMENTATION_START { | ||
| hunter_add_package(eyalroz_printf) | ||
| find_package(printf CONFIG REQUIRED) | ||
|
|
||
| add_executable(main main.c) | ||
| target_link_libraries(main PUBLIC printf::printf) | ||
| # DOCUMENTATION_END } | ||
|
crvux marked this conversation as resolved.
|
||
|
|
||
| # Test double library creation | ||
| find_package(printf CONFIG REQUIRED) | ||
This file contains hidden or 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,12 @@ | ||
| #include <stdio.h> | ||
| #include <printf/printf.h> | ||
|
|
||
| void putchar_(char c) { | ||
| putchar(c); | ||
| } | ||
|
|
||
| int main() { | ||
| printf_("%s %d %f\n", "Hello World!", 42, 3.1415); | ||
| return 0; | ||
| } | ||
|
|
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.
Uh oh!
There was an error while loading. Please reload this page.