Skip to content

Commit fd4ee04

Browse files
committed
Deployed 85fc05f to dev with MkDocs 1.6.1 and mike 2.1.1
1 parent 85fc05f commit fd4ee04

File tree

2 files changed

+46
-54
lines changed

2 files changed

+46
-54
lines changed

dev/api/index.html

Lines changed: 45 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,18 @@
645645
<ul class="md-nav__list">
646646

647647
<li class="md-nav__item">
648-
<a href="#available-options" class="md-nav__link">
648+
<a href="#cmake-options" class="md-nav__link">
649649
<span class="md-ellipsis">
650-
Available Options
650+
CMake Options
651+
</span>
652+
</a>
653+
654+
</li>
655+
656+
<li class="md-nav__item">
657+
<a href="#macros" class="md-nav__link">
658+
<span class="md-ellipsis">
659+
Macros
651660
</span>
652661
</a>
653662

@@ -1977,72 +1986,55 @@ <h2 id="configuration-options">Configuration Options</h2>
19771986
enable or disable features and to optimize for binary size. For example, you
19781987
can disable OS-specific APIs defined in <code>fmt/os.h</code> with <code>-DFMT_OS=OFF</code> when
19791988
configuring CMake.</p>
1980-
<h3 id="available-options">Available Options</h3>
1989+
<h3 id="cmake-options">CMake Options</h3>
1990+
<ul>
1991+
<li><strong><code>FMT_OS</code></strong>: When set to <code>OFF</code>, disables OS-specific APIs (<code>fmt/os.h</code>).</li>
1992+
<li><strong><code>FMT_UNICODE</code></strong>: When set of <code>OFF</code>, disables Unicode support on
1993+
Windows/MSVC. Unicode support is always enabled on other platforms.</li>
1994+
</ul>
1995+
<h3 id="macros">Macros</h3>
19811996
<ul>
19821997
<li>
1983-
<p><strong><code>FMT_HEADER_ONLY</code></strong>
1984-
Default: <code>0</code>
1985-
Enables header-only mode when set to <code>1</code> (CMake target <code>fmt::fmt-header-only</code>
1986-
defines it); disable with <code>0</code> for library mode.</p>
1987-
</li>
1988-
<li>
1989-
<p><strong><code>FMT_OS</code></strong>
1990-
Default: <code>ON</code>
1991-
Enables OS-specific APIs (<code>fmt/os.h</code>); disable with <code>OFF</code>.</p>
1992-
</li>
1993-
<li>
1994-
<p><strong><code>FMT_UNICODE</code></strong>
1995-
Default: <code>ON</code>
1996-
Enables Unicode support; disable with <code>OFF</code>.</p>
1998+
<p><strong><code>FMT_HEADER_ONLY</code></strong>: Enables the header-only mode when set to <code>1</code> as an
1999+
alternative to using the <code>fmt::fmt-header-only</code> CMake target. Default: <code>0</code>.</p>
19972000
</li>
19982001
<li>
1999-
<p><strong><code>FMT_USE_EXCEPTIONS</code></strong>
2000-
Default: <code>1</code> (<code>0</code> if compiled with <code>-fno-exceptions</code>)
2001-
Enables exception-based error handling; disable with <code>0</code>.</p>
2002+
<p><strong><code>FMT_USE_EXCEPTIONS</code></strong>: Disables the use of exceptions when set to <code>0</code>.
2003+
Default: <code>1</code> (<code>0</code> if compiled with <code>-fno-exceptions</code>).</p>
20022004
</li>
20032005
<li>
2004-
<p><strong><code>FMT_BUILTIN_TYPES</code></strong>
2005-
Default: <code>1</code>
2006-
Enables built-in type formatters; disable with <code>0</code>.</p>
2006+
<p><strong><code>FMT_USE_LOCALE</code></strong>: When set to <code>0</code>, disables locale support.
2007+
Default: <code>1</code> (<code>0</code> when <code>FMT_OPTIMIZE_SIZE &gt; 1</code>).</p>
20072008
</li>
20082009
<li>
2009-
<p><strong><code>FMT_OPTIMIZE_SIZE</code></strong>
2010-
Default: <code>0</code>
2011-
Controls size-optimized routines: <code>0</code> = off, <code>1</code> = size optimization, <code>&gt;1</code> =
2012-
aggressive size optimization disabling format-string checks.</p>
2010+
<p><strong><code>FMT_CUSTOM_ASSERT_FAIL</code></strong>: When set to <code>1</code>, allows users to provide a
2011+
custom <code>fmt::assert_fail</code> function which is called on assertion failures and,
2012+
if exceptions are disabled, on runtime errors. Default: <code>0</code>.</p>
20132013
</li>
20142014
<li>
2015-
<p><strong><code>FMT_USE_LOCALE</code></strong>
2016-
Default: <code>1</code> (<code>0</code> when <code>FMT_OPTIMIZE_SIZE &gt; 1</code>)
2017-
Enables locale-dependent formatting; disable with <code>0</code>.</p>
2015+
<p><strong><code>FMT_BUILTIN_TYPES</code></strong>: When set to <code>0</code>, disables built-in handling of
2016+
arithmetic and string types other than <code>int</code>. This reduces library size at
2017+
the cost of per-call overhead. Default: <code>1</code>.</p>
20182018
</li>
20192019
<li>
2020-
<p><strong><code>FMT_THROW(x)</code></strong>
2021-
Default: <code>throw x</code> (or <code>abort</code>)
2022-
Defines error handling via macro (not a toggle flag): if exceptions enabled,
2023-
<code>throw x</code>; otherwise, <code>fmt::assert_fail(...)</code>.</p>
2020+
<p><strong><code>FMT_OPTIMIZE_SIZE</code></strong>: Controls binary size optimizations:</p>
20242021
</li>
2022+
<li><code>0</code> - off (default)</li>
2023+
<li><code>1</code> - disables locale support and applies some optimizations</li>
2024+
<li><code>2</code> - disables some Unicode features, named arguments and applies more
2025+
aggresive optimizations</li>
20252026
</ul>
20262027
<h3 id="binary-size-optimization">Binary Size Optimization</h3>
2027-
<p>To minimize your binary footprint, use the following CMake configuration and
2028-
compile definitions:</p>
2029-
<pre><code class="language-cmake"># Link to the header-only target
2030-
target_link_libraries(${PROJECT_NAME} PRIVATE fmt::fmt-header-only)
2031-
# Disable OS-specific APIs
2032-
set(FMT_OS OFF CACHE BOOL &quot;&quot; FORCE)
2033-
# Disable Unicode support
2034-
set(FMT_UNICODE OFF CACHE BOOL &quot;&quot; FORCE)
2035-
# Add compile definitions to your target
2036-
target_compile_definitions(
2037-
${PROJECT_NAME}
2038-
PRIVATE
2039-
FMT_USE_EXCEPTIONS=0
2040-
FMT_OS=0
2041-
FMT_BUILTIN_TYPES=0
2042-
FMT_OPTIMIZE_SIZE=2
2043-
FMT_USE_LOCALE=0
2044-
)
2045-
</code></pre>
2028+
<p>To minimize the binary footprint of {fmt} as much as possible at the cost of
2029+
some features, you can use the following configuration:</p>
2030+
<ul>
2031+
<li>CMake options:</li>
2032+
<li><code>FMT_OS=OFF</code></li>
2033+
<li>Macros:</li>
2034+
<li><code>FMT_USE_EXCEPTIONS=0</code></li>
2035+
<li><code>FMT_BUILTIN_TYPES=0</code></li>
2036+
<li><code>FMT_OPTIMIZE_SIZE=2</code></li>
2037+
</ul>
20462038

20472039

20482040

dev/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)