Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake subproject with MSVC generate many warnings D9025 #6021

Closed
SkyMaverick opened this issue Oct 10, 2019 · 7 comments
Closed

CMake subproject with MSVC generate many warnings D9025 #6021

SkyMaverick opened this issue Oct 10, 2019 · 7 comments
Labels
dependency:cmake Issues related to `dependency` with the `cmake` method
Milestone

Comments

@SkyMaverick
Copy link

I use the CMake subproject in a project with cl-compiler and the ninja build system. The meson automatically puts the /ZI argument, but when parsing a subproject, it puts the /Zi argument. This causes many warnings D9025.

@SkyMaverick SkyMaverick changed the title CMake subproject with MSVC warnings D9025 CMake subproject with MSVC generate many warnings D9025 Oct 10, 2019
@mensinda mensinda added the dependency:cmake Issues related to `dependency` with the `cmake` method label Oct 10, 2019
@xclaesse
Copy link
Member

I think this is part of a bigger issue: We should pass to cmake all external args (e.g. cflags), especially when cross compiling, because cmake could need them to run its checks, etc. But then all those flags will end into the generated shared_library(c_args: ...) and meson will duplicate them all.

I think the solution is to add a new feature to Meson, shared_library(..., plain : true) where meson won't add any other compiler arguments.

@jpakkane
Copy link
Member

Adding flags for people to workaround issues is not scalable. Making it work automatically is.

@xclaesse
Copy link
Member

xclaesse commented Oct 10, 2019

@jpakkane doesn't have to be part of meson's public API, could be an internal feature just for the cmake module. When I said shared_library(..., plain : true) it's not the user writing that, but the AST generated by cmake module.

@mensinda
Copy link
Member

I don't think we need a specific feature for this. I would rather continue with the current argument blacklist approach and let meson handle those flags. Especially in this case where debug information is controlled. This is also how normal subprojects usually function unless the cargs are manually overwritten.

@mensinda
Copy link
Member

@SkyMaverick Could you please upload (Pastebin, etc.) build/meson-logs/meson-log.txt and build/subprojects/<your subproject>/meson.build if it exists? This would help me identify where I have to blacklist flags.

@SkyMaverick
Copy link
Author

@mensinda Done.
Used by libuv and libutf8proc as cmake-subprojects. meson-log.txt, libutf8proc meson.build, libuv meson.build.
Also uploaded build.ninja and ninja stdout, if need.

mensinda added a commit to mensinda/meson that referenced this issue Oct 10, 2019
@mensinda
Copy link
Member

Should be fixed with #6025.

@mensinda mensinda added this to the 0.52.1 milestone Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:cmake Issues related to `dependency` with the `cmake` method
Projects
None yet
Development

No branches or pull requests

4 participants