aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-30 23:32:31 +0300
committerGitHub <noreply@github.com>2018-05-30 23:32:31 +0300
commit05f8b1bd7829c425a8a4838394b8c2d5964c7553 (patch)
tree1cfbbf9280a0f8c4ceeb9c5ee81f86b54ad61066 /docs/markdown/snippets
parent00654aeb11e110d41567a0ff00300619c705170f (diff)
parent27b290d6dff14fdb7717d414fb941aca0fd2dc55 (diff)
downloadmeson-05f8b1bd7829c425a8a4838394b8c2d5964c7553.zip
meson-05f8b1bd7829c425a8a4838394b8c2d5964c7553.tar.gz
meson-05f8b1bd7829c425a8a4838394b8c2d5964c7553.tar.bz2
Merge pull request #3643 from mesonbuild/nirbheek/check_header
New compiler method: check_header
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/compiler_check_header.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/markdown/snippets/compiler_check_header.md b/docs/markdown/snippets/compiler_check_header.md
new file mode 100644
index 0000000..8981d13
--- /dev/null
+++ b/docs/markdown/snippets/compiler_check_header.md
@@ -0,0 +1,12 @@
+## New compiler check: check_header()
+
+The existing compiler check `has_header()` only checks if the header exists,
+either with the `__has_include` C++11 builtin, or by running the pre-processor.
+
+However, sometimes the header you are looking for is unusable on some platforms
+or with some compilers in a way that is only detectable at compile-time. For
+such cases, you should use `check_header()` which will include the header and
+run a full compile.
+
+Note that `has_header()` is much faster than `check_header()`, so it should be
+used whenever possible.