Warn about .C and .H files (#8249)

pull/8254/head
Volker-Weissmann 4 years ago committed by GitHub
parent bb6385111a
commit 9e3bb9eea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      mesonbuild/mesonlib/universal.py

@ -348,8 +348,15 @@ class FileMode:
perms |= stat.S_ISVTX
return perms
dot_C_dot_H_warning = """You are using .C or .H files in your project. This is deprecated.
Currently, Meson treats this as C code, but this
might change in the future, breaking your build.
You code also might be already broken on gcc and clang.
See https://github.com/mesonbuild/meson/pull/8239 for the discussions."""
class File:
def __init__(self, is_built: bool, subdir: str, fname: str):
if fname.endswith(".C") or fname.endswith(".H"):
mlog.warning(dot_C_dot_H_warning, once=True)
self.is_built = is_built
self.subdir = subdir
self.fname = fname

Loading…
Cancel
Save