Warn about .C and .H files
@@ -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
