mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.35k stars 1.53k forks source link

do @ substitution for normal cmake format, separate cmakedefine and mesondefine logic #13208

Open Jan200101 opened 1 month ago

Jan200101 commented 1 month ago

Follows upstream cmake, see configure_file.

cmake substitutes ${VAR} and @VAR@ by default and only @VAR@ if @ONLY is specified.

meson previously substituded ${VAR} with cmake and @VAR@ with cmake@ but this has now been fixed so that cmake also substitudes @VAR@.

Ontop of that I also split most of the cmakedefine and mesondefine code into specific functions so changes to either won't cause regressions in the other (as the previous cmakedefine PR did).

work was done to ensure all the exported interfaces continue being available.

cmakedefine was tested using cmakedefine-test and mesondefine was tested using the AllPlatformTests.test_do_conf_file_by_format unit test.

Jan200101 commented 1 month ago

the compilation errors appear unrelated