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

eyalroz_printf: Add version 6.2.0 #725

Merged
merged 6 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ hunter_default_version(eos VERSION 0.12.1)
hunter_default_version(etc2comp VERSION 0.0.0-9cd0f9c-p0)
hunter_default_version(ethash VERSION 1.0.0)
hunter_default_version(eventpp VERSION 0.1.2-for-hunter-pm)
hunter_default_version(eyalroz_printf VERSION 6.2.0-b1)
hunter_default_version(farmhash VERSION 1.1)
hunter_default_version(fast_obj VERSION 1.1-9255172-p0)
hunter_default_version(ffmpeg VERSION n4.1-dev-45499e557c-p7)
Expand Down
30 changes: 30 additions & 0 deletions cmake/projects/eyalroz_printf/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2023 Alexander Voronov
# 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)
include(hunter_report_broken_package)
include(hunter_status_debug)

hunter_add_version(
PACKAGE_NAME eyalroz_printf
VERSION "6.2.0-b1"
URL "https://github.com/eyalroz/printf/archive/refs/tags/v6.2.0-b1.zip"
SHA1 4f2e2bbfffb9f6db46d87c5152ce17dd9f7053d5
)

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)

19 changes: 19 additions & 0 deletions docs/packages/pkg/eyalroz_printf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. spelling::

eyalroz
printf

.. index:: logging ; eyalroz_printf

.. _pkg.eyalroz_printf:

eyalroz_printf
==============

- `Official <https://github.com/eyalroz/printf>`__

.. literalinclude:: /../examples/eyalroz_printf/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }

20 changes: 20 additions & 0 deletions examples/eyalroz_printf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2023, Alexander Voronov
# All rights reserved.

cmake_minimum_required(VERSION 3.5)

set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake")

# 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 }
6 changes: 6 additions & 0 deletions examples/eyalroz_printf/config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hunter_config(
eyalroz_printf
VERSION 6.2.0-b1
CMAKE_ARGS BUILD_STATIC_LIBRARY=ON
)

12 changes: 12 additions & 0 deletions examples/eyalroz_printf/main.c
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;
}