Browse Source

more cpp extensions
04b8e856256b5792e211be9506aba1c1d21f0181

egovol 10 months ago
parent
commit
ab9c5839c2
3 changed files with 8 additions and 6 deletions
  1. 4 0
      build/plugins/lib/test_const/__init__.py
  2. 1 3
      build/plugins/ytest.py
  3. 3 3
      build/ymake.core.conf

+ 4 - 0
build/plugins/lib/test_const/__init__.py

@@ -54,6 +54,10 @@ CANON_SBR_RESOURCE_REGEX = re.compile(r'(sbr:/?/?(\d+))')
 
 MANDATORY_ENV_VAR_NAME = 'YA_MANDATORY_ENV_VARS'
 
+STYLE_CPP_SOURCE_EXTS = [".cpp", ".cxx", ".cc", ".c", ".C"]
+STYLE_CPP_HEADER_EXTS = [".h", ".H", ".hh", ".hpp", ".hxx", ".ipp"]
+STYLE_CPP_ALL_EXTS = STYLE_CPP_SOURCE_EXTS + STYLE_CPP_HEADER_EXTS
+
 BUILD_FLAGS_ALLOWED_IN_CONTEXT = {
     'AUTOCHECK',
     # Required for local test runs

+ 1 - 3
build/plugins/ytest.py

@@ -1313,9 +1313,7 @@ def on_add_linter_check(unit, *args):
             test_files.append(path)
 
     if lint_name == 'cpp_style':
-        cpp_extensions = ["cpp", "cxx", "cc", "c"]
-        header_extensions = ["h", "hh", "hpp"]
-        files_dart = reference_group_var("ALL_SRCS", cpp_extensions + header_extensions)
+        files_dart = reference_group_var("ALL_SRCS", consts.STYLE_CPP_ALL_EXTS)
     else:
         if not test_files:
             unit.message(['WARN', 'No files to lint for {}'.format(lint_name)])

+ 3 - 3
build/ymake.core.conf

@@ -30,7 +30,7 @@ BINDIR=bin:/
 SRCDIR=
 YMAKE=ymake
 ECHO=echo
-INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i .ipp .ixx .ya_exposed
+INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i .ipp .ixx .ya_exposed .hxx .H
 CPP_EXT=.cpp
 OBJ_SUF=
 CFLAGS=
@@ -5827,9 +5827,9 @@ macro STYLE_CPP() {
 
 ### @usage: HEADERS([Dir1 Dir2 ...])
 ###
-### Add all C/C++ header files (h/hh/hpp) in given directories to SRCS
+### Add all C/C++ header files (h|H|hh|hpp|hxx|ipp) in given directories to SRCS
 macro HEADERS(Dirs...) {
-    _GLOB(_HEADERS ${suf=/*.(h|hh|hpp):Dirs})
+    _GLOB(_HEADERS ${suf=/*.(h|H|hh|hpp|hxx|ipp):Dirs})
     SRCS($_HEADERS)
 }