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

meson cmake msvc cmd line option detection is wrong #11717

Open
Neumann-A opened this issue Apr 22, 2023 · 0 comments
Open

meson cmake msvc cmd line option detection is wrong #11717

Neumann-A opened this issue Apr 22, 2023 · 0 comments
Assignees
Labels
module:cmake Issues related to the cmake module, including cmake.subproject

Comments

@Neumann-A
Copy link
Contributor

def is_cmdline_option(compiler: 'Compiler', arg: str) -> bool:
if compiler.get_argument_syntax() == 'msvc':
return arg.startswith('/')
else:
return arg.startswith('-')

This detection is wrong and leads to stupid stuff like:

set(CMAKE_SIZEOF_VOID_P "8")
set(CMAKE_C_COMPILER_LAUNCHER "C:/Program Files/LLVM/bin/clang-cl.exe")
set(CMAKE_C_COMPILER "-DWIN32" <more flags>)

MSVC is totally fine with - options

@eli-schwartz eli-schwartz added the module:cmake Issues related to the cmake module, including cmake.subproject label Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:cmake Issues related to the cmake module, including cmake.subproject
Projects
None yet
Development

No branches or pull requests

3 participants