Open seungha-yang opened 5 years ago
I feel like this shouldn't be in subprojects as it's really related to the source code itself...
The current "best" solution is to add it to c_args
at al during the initial setup. Or if you have a known master project you can add it with add_global_arguments
instead of add_project_arguments
.
Why should this be a user option, isn't it more like a project option? I mean, the (sub)project author will know what the source code should be encoded as, no?
Why should this be a user option, isn't it more like a project option? I mean, the (sub)project author will know what the source code should be encoded as, no?
That's because a project author most likely missing that argument if it doesn't cause any issue? So that user can fix that issue by an user option without meson.build
modification.
The current "best" solution is to add it to c_args at al during the initial setup. Or if you have a known master project you can add it with add_global_arguments instead of add_project_arguments.
I didn't noticed that c_args
can make it work. I just thought that a built-in option (e.g., -Dsource-character-set=utf-8, and default=utf-8) can make people happy ... Just c_args seems to fine.
Unlike
gcc
,msvc
might assume the source file encoding is current user code page.https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=vs-2019
When
/utf-8
wasn't passed to argument, somebody might have detected some weird compile error for exampleThe solution is passing
/utf-8
viaadd_project_arguments()
until now. I feel this should be abuilt-in
meson option for user to set and also to allow propagating that option over subprojects.