Skip to content

Commit a6e59fd

Browse files
author
github-actions
committed
Update
1 parent bd978af commit a6e59fd

18 files changed

+24
-13
lines changed

Compiler-properties.html

+8
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,14 @@ <h2 id="does-a-function-exist">Does a function exist?</h2>
372372
correctly report the function as missing. Without the header however,
373373
it would lack the necessary availability information and incorrectly
374374
report the function as available.</p>
375+
<h2 id="is-a-macro-defined">Is a macro defined?</h2>
376+
<p>Macro detection can often be useful to determine if non-standard features
377+
are supported on your target platform. Fortunately, Meson makes it
378+
easy to check if a macro is defined:</p>
379+
<pre><code class="language-meson">if <a href="Reference-manual_returned_compiler.html#compilerhas_define"><ins>compiler.has_define</ins></a>('__SIZEOF_INT128__')
380+
# macro is defined, do whatever is required
381+
endif
382+
</code></pre>
375383
<h2 id="does-a-structure-contain-a-member">Does a structure contain a member?</h2>
376384
<p>Some platforms have different standard structures. Here's how one
377385
would check if a struct called <code>mystruct</code> from header <code>myheader.h</code>

assets/js/search/Fortunately

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
urls_downloaded_cb({"token":"Fortunately","urls":[{"url":"Compiler-properties.html#is-a-macro-defined","node_type":"p","page":"Compiler properties","sections":["Compiler properties","Is a macro defined?"],"context":{"gi-language":["default"]}}]});

assets/js/search/Meson

+1-1
Large diffs are not rendered by default.

assets/js/search/check

+1-1
Large diffs are not rendered by default.

assets/js/search/defined

+1-1
Large diffs are not rendered by default.

assets/js/search/detection

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
urls_downloaded_cb({"token":"detection","urls":[{"url":"Dependencies.html#dependencies-with-custom-lookup-functionality","node_type":"p","page":"Dependencies","sections":["Dependencies with custom lookup functionality"],"context":{"gi-language":["default"]}},{"url":"Dependencies.html#dependency-detection-method","node_type":"h1","page":"Dependencies","sections":["Dependency detection method"],"context":{"gi-language":["default"]}},{"url":"FAQ.html#i-have-proprietary-compiler-toolchain-x-that-does-not-work-with-meson-how-can-i-make-it-work","node_type":"ul","page":"FAQ","sections":["Meson Frequently Asked Questions","I have proprietary compiler toolchain X that does not work with Meson, how can I make it work?"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#dependency","node_type":"p","page":"Functions","sections":["Functions","dependency()"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-46-0.html#support-for-lcc-compiler-for-e2k-elbrus-architecture","node_type":"ul","page":"Release 0.46","sections":["New features","Support for lcc compiler for e2k (Elbrus) architecture"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-47-0.html#feature-detection-based-on-meson_version-in-project","node_type":"h2","page":"Release 0.47","sections":["New features","Feature detection based on meson_version: in project()\n"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-51-0.html#new-target-keyword-argument-link_language","node_type":"p","page":"Release 0.51.0","sections":["New features","New target keyword argument: link_language\n"],"context":{"gi-language":["default"]}}]});
1+
urls_downloaded_cb({"token":"detection","urls":[{"url":"Compiler-properties.html#is-a-macro-defined","node_type":"p","page":"Compiler properties","sections":["Compiler properties","Is a macro defined?"],"context":{"gi-language":["default"]}},{"url":"Dependencies.html#dependencies-with-custom-lookup-functionality","node_type":"p","page":"Dependencies","sections":["Dependencies with custom lookup functionality"],"context":{"gi-language":["default"]}},{"url":"Dependencies.html#dependency-detection-method","node_type":"h1","page":"Dependencies","sections":["Dependency detection method"],"context":{"gi-language":["default"]}},{"url":"FAQ.html#i-have-proprietary-compiler-toolchain-x-that-does-not-work-with-meson-how-can-i-make-it-work","node_type":"ul","page":"FAQ","sections":["Meson Frequently Asked Questions","I have proprietary compiler toolchain X that does not work with Meson, how can I make it work?"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#dependency","node_type":"p","page":"Functions","sections":["Functions","dependency()"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-46-0.html#support-for-lcc-compiler-for-e2k-elbrus-architecture","node_type":"ul","page":"Release 0.46","sections":["New features","Support for lcc compiler for e2k (Elbrus) architecture"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-47-0.html#feature-detection-based-on-meson_version-in-project","node_type":"h2","page":"Release 0.47","sections":["New features","Feature detection based on meson_version: in project()\n"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-51-0.html#new-target-keyword-argument-link_language","node_type":"p","page":"Release 0.51.0","sections":["New features","New target keyword argument: link_language\n"],"context":{"gi-language":["default"]}}]});

assets/js/search/determine

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
urls_downloaded_cb({"token":"determine","urls":[{"url":"ARM-performance-test.html#measurements","node_type":"p","page":"Arm performance test","sections":["Arm performance test","Measurements"],"context":{"gi-language":["default"]}},{"url":"Adding-arguments.html#global-arguments","node_type":"p","page":"Adding arguments","sections":["Adding arguments","Global arguments"],"context":{"gi-language":["default"]}},{"url":"Compiler-properties.html#expression-size","node_type":"p","page":"Compiler properties","sections":["Compiler properties","Expression size"],"context":{"gi-language":["default"]}},{"url":"Creating-OSX-packages.html#external-libraries","node_type":"p","page":"Creating OSX packages","sections":["Creating OSX packages","Creating an app bundle","External libraries"],"context":{"gi-language":["default"]}},{"url":"Cross-compilation.html#introspection-and-system-checks","node_type":"p","page":"Cross compilation","sections":["Cross compilation","Introspection and system checks"],"context":{"gi-language":["default"]}},{"url":"Design-rationale.html#overview-of-the-solution","node_type":"p","page":"Design rationale","sections":["This is the original design rationale for Meson. The syntax it\ndescribes does not match the released version","Overview of the solution"],"context":{"gi-language":["default"]}},{"url":"FAQ.html#why-dont-the-arguments-passed-to-add_project_link_arguments-affect-anything","node_type":"p","page":"FAQ","sections":["Meson Frequently Asked Questions","Why don't the arguments passed to add_project_link_arguments affect anything?"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#add_install_script_dry_run","node_type":"p","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#arguments2","node_type":"table","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#mesonadd_install_script","node_type":"p","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments10","node_type":"p","page":"Functions","sections":["Functions","both_libraries()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments11","node_type":"p","page":"Functions","sections":["Functions","build_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments14","node_type":"table","page":"Functions","sections":["Functions","custom_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments20","node_type":"p","page":"Functions","sections":["Functions","executable()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments36","node_type":"p","page":"Functions","sections":["Functions","jar()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments38","node_type":"p","page":"Functions","sections":["Functions","library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments45","node_type":"p","page":"Functions","sections":["Functions","shared_library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments46","node_type":"p","page":"Functions","sections":["Functions","shared_module()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments47","node_type":"p","page":"Functions","sections":["Functions","static_library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#custom_target_build_by_default","node_type":"p","page":"Functions","sections":["Functions","custom_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#structured_sources","node_type":"p","page":"Functions","sections":["Functions","structured_sources()"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_returned_external_program.html#external_programversion","node_type":"p","page":"External program","sections":["External program (external_program)","External program methods","external_program.version()"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-48-0.html#dependencyversion-now-applies-to-all-dependency-types","node_type":"p","page":"Release 0.48","sections":["New features","\ndependency(version:) now applies to all dependency types"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-49-0.html#new-compiler-method-get_argument_syntax","node_type":"p","page":"Release 0.49","sections":["New features","New compiler method get_argument_syntax\n"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-52-0.html#dist-is-now-a-top-level-command","node_type":"p","page":"Release 0.52.0","sections":["New features","Dist is now a top level command"],"context":{"gi-language":["default"]}},{"url":"Rust.html#mixing-generated-and-static-sources","node_type":"p","page":"Rust","sections":["Using Rust with Meson","Mixing Generated and Static sources"],"context":{"gi-language":["default"]}},{"url":"Unit-tests.html#skipped-tests-and-hard-errors","node_type":"p","page":"Unit tests","sections":["Unit tests","Skipped tests and hard errors"],"context":{"gi-language":["default"]}},{"url":"Using-wraptool.html#simple-querying","node_type":"p","page":"Using wraptool","sections":["Using wraptool","Simple querying"],"context":{"gi-language":["default"]}}]});
1+
urls_downloaded_cb({"token":"determine","urls":[{"url":"ARM-performance-test.html#measurements","node_type":"p","page":"Arm performance test","sections":["Arm performance test","Measurements"],"context":{"gi-language":["default"]}},{"url":"Adding-arguments.html#global-arguments","node_type":"p","page":"Adding arguments","sections":["Adding arguments","Global arguments"],"context":{"gi-language":["default"]}},{"url":"Compiler-properties.html#expression-size","node_type":"p","page":"Compiler properties","sections":["Compiler properties","Expression size"],"context":{"gi-language":["default"]}},{"url":"Compiler-properties.html#is-a-macro-defined","node_type":"p","page":"Compiler properties","sections":["Compiler properties","Is a macro defined?"],"context":{"gi-language":["default"]}},{"url":"Creating-OSX-packages.html#external-libraries","node_type":"p","page":"Creating OSX packages","sections":["Creating OSX packages","Creating an app bundle","External libraries"],"context":{"gi-language":["default"]}},{"url":"Cross-compilation.html#introspection-and-system-checks","node_type":"p","page":"Cross compilation","sections":["Cross compilation","Introspection and system checks"],"context":{"gi-language":["default"]}},{"url":"Design-rationale.html#overview-of-the-solution","node_type":"p","page":"Design rationale","sections":["This is the original design rationale for Meson. The syntax it\ndescribes does not match the released version","Overview of the solution"],"context":{"gi-language":["default"]}},{"url":"FAQ.html#why-dont-the-arguments-passed-to-add_project_link_arguments-affect-anything","node_type":"p","page":"FAQ","sections":["Meson Frequently Asked Questions","Why don't the arguments passed to add_project_link_arguments affect anything?"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#add_install_script_dry_run","node_type":"p","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#arguments2","node_type":"table","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_builtin_meson.html#mesonadd_install_script","node_type":"p","page":"meson","sections":["Meson object (meson)","Meson object methods","meson.add_install_script()"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments10","node_type":"p","page":"Functions","sections":["Functions","both_libraries()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments11","node_type":"p","page":"Functions","sections":["Functions","build_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments14","node_type":"table","page":"Functions","sections":["Functions","custom_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments20","node_type":"p","page":"Functions","sections":["Functions","executable()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments36","node_type":"p","page":"Functions","sections":["Functions","jar()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments38","node_type":"p","page":"Functions","sections":["Functions","library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments45","node_type":"p","page":"Functions","sections":["Functions","shared_library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments46","node_type":"p","page":"Functions","sections":["Functions","shared_module()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#arguments47","node_type":"p","page":"Functions","sections":["Functions","static_library()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#custom_target_build_by_default","node_type":"p","page":"Functions","sections":["Functions","custom_target()","Arguments"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_functions.html#structured_sources","node_type":"p","page":"Functions","sections":["Functions","structured_sources()"],"context":{"gi-language":["default"]}},{"url":"Reference-manual_returned_external_program.html#external_programversion","node_type":"p","page":"External program","sections":["External program (external_program)","External program methods","external_program.version()"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-48-0.html#dependencyversion-now-applies-to-all-dependency-types","node_type":"p","page":"Release 0.48","sections":["New features","\ndependency(version:) now applies to all dependency types"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-49-0.html#new-compiler-method-get_argument_syntax","node_type":"p","page":"Release 0.49","sections":["New features","New compiler method get_argument_syntax\n"],"context":{"gi-language":["default"]}},{"url":"Release-notes-for-0-52-0.html#dist-is-now-a-top-level-command","node_type":"p","page":"Release 0.52.0","sections":["New features","Dist is now a top level command"],"context":{"gi-language":["default"]}},{"url":"Rust.html#mixing-generated-and-static-sources","node_type":"p","page":"Rust","sections":["Using Rust with Meson","Mixing Generated and Static sources"],"context":{"gi-language":["default"]}},{"url":"Unit-tests.html#skipped-tests-and-hard-errors","node_type":"p","page":"Unit tests","sections":["Unit tests","Skipped tests and hard errors"],"context":{"gi-language":["default"]}},{"url":"Using-wraptool.html#simple-querying","node_type":"p","page":"Using wraptool","sections":["Using wraptool","Simple querying"],"context":{"gi-language":["default"]}}]});

0 commit comments

Comments
 (0)