diff options
author | Mathieu Duponchelle <MathieuDuponchelle@users.noreply.github.com> | 2017-04-28 19:19:36 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-28 23:01:38 +0300 |
commit | b983d091e66aad076385c283241f9bf03fe05839 (patch) | |
tree | 2d8757d2908f46d8da85c32d5161abf83e1d0211 /docs/markdown | |
parent | 4c35b4b79193033eb6b123e98019e88dc4b29697 (diff) | |
download | meson-b983d091e66aad076385c283241f9bf03fe05839.zip meson-b983d091e66aad076385c283241f9bf03fe05839.tar.gz meson-b983d091e66aad076385c283241f9bf03fe05839.tar.bz2 |
howtox.md: fix header hierarchy
.. and remove an obsolete wiki home link at the bottom of the page
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/howtox.md | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md index d40e8cd..c765853 100644 --- a/docs/markdown/howtox.md +++ b/docs/markdown/howtox.md @@ -2,7 +2,7 @@ This page lists code snippets for common tasks. These are written mostly using the C compiler, but the same approach should work on almost all other compilers. -# Set compiler +## Set compiler When first running Meson, set it in an environment variable. @@ -10,14 +10,14 @@ When first running Meson, set it in an environment variable. $ CC=mycc meson <options> ``` -# Set default C/C++ language version +## Set default C/C++ language version ```meson project('myproj', 'c', 'cpp', default_options : ['c_std=c11', 'cpp_std=c++11']) ``` -# Enable threads +## Enable threads Lots of people seem to do this manually with `find_library('phtread')` or something similar. Do not do that. It is not portable. Instead do this. @@ -26,7 +26,7 @@ thread_dep = dependency('threads') executable(..., dependencies : thread_dep) ``` -# Set extra compiler and linker flags from the outside (when e.g. building distro packages) +## Set extra compiler and linker flags from the outside (when e.g. building distro packages) The behaviour is the same as with other build systems, with environment variables during first invocation. @@ -34,7 +34,7 @@ The behaviour is the same as with other build systems, with environment variable $ CFLAGS=-fsomething LDFLAGS=-Wl,--linker-flag meson <options> ``` -# Use an argument only with a specific compiler +## Use an argument only with a specific compiler First check which arguments to use. @@ -60,7 +60,7 @@ if meson.get_compiler('c').get_id() == 'clang' endif ``` -# Set a command's output to configuration +## Set a command's output to configuration ```meson txt = run_command('script', 'argument').stdout().strip() @@ -69,7 +69,7 @@ cdata.set('SOMETHING', txt) configure_file(...) ``` -# Generate a runnable script with `configure_file` +## Generate a runnable script with `configure_file` `configure_file` preserves metadata so if your template file has execute permissions, the generated file will have them too. @@ -154,7 +154,3 @@ executable(..., dependencies : m_dep) ```meson executable(..., install : true, install_dir : get_option('libexecdir')) ``` - ----- - -[Wiki home](index.md) |