Open dcbaker opened 1 month ago
Pretty sure the docs will also need an update. Presently they make it sound like meson
and cmake@
are identical in their behavior, which doesn't make sense. One of the three options should allow both ${var}
and @var@
. From the docs
The format of defines. It defaults to
'meson'
, and so substitutes#mesondefine
statements and variables surrounded by@
characters, you can also use'cmake'
to replace#cmakedefine
statements and variables with the${variable}
syntax. Finally you can use'cmake@'
in which case substitutions will apply on#cmakedefine
statements and variables with the@variable@
syntax.
meson
and cmake@
look correct to me. as they do the following:
@...@
, and #mesondefine
@...@
, and #cmakedefine
🤦 I missed the difference in the #___define terms
.
Describe the bug given a replacement file:
CMake with a regular call to
configure_file()
will replace both the@var@
and${var}
, but Meson will only replace the latter. CMake will only replace the@var@
when using theONLY@
configuration in cmakeTo Reproduce Give the above file snippet as "file.in", and the following Meson vs CMake snippets:
CMake will produce:
while Meson will produce:
Expected behavior Meson will generate the same output as CMake
system parameters
meson --version
: 1.5.99 and 1.4.2ninja --version
if it's a Ninja build: 1.11.1