forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eyalroz_printf: Add version 6.2.0-b1
A package for a library that provides a custom printf implementation. See https://github.com/eyalroz/printf.
- Loading branch information
Showing
6 changed files
with
89 additions
and
0 deletions.
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
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,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) | ||
|
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,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 } | ||
|
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,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 } |
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,6 @@ | ||
hunter_config( | ||
eyalroz_printf | ||
VERSION 6.2.0-b1 | ||
CMAKE_ARGS BUILD_STATIC_LIBRARY=ON | ||
) | ||
|
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,13 @@ | ||
#include <stdio.h> | ||
#include <math.h> | ||
#include <printf/printf.h> | ||
|
||
void putchar_(char c) { | ||
putchar(c); | ||
} | ||
|
||
int main() { | ||
printf_("%s %d %f\n", "Hello World!", 42, M_PI); | ||
return 0; | ||
} | ||
|