Browse Source

HEADERS macro
309672fc45c700b977182e068736589cb6650407

egovol 10 months ago
parent
commit
5125038c32
1 changed files with 8 additions and 0 deletions
  1. 8 0
      build/ymake.core.conf

+ 8 - 0
build/ymake.core.conf

@@ -5823,6 +5823,14 @@ macro STYLE_CPP() {
     _ADD_LINTER_CHECK(cpp_style tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format CONFIGS build/config/tests/cpp_style/config.clang-format)
 }
 
+### @usage: HEADERS([Dir1 Dir2 ...])
+###
+### Add all C/C++ header files (h/hh/hpp) in given directories to SRCS
+macro HEADERS(Dirs...) {
+    _GLOB(_HEADERS ${suf=/*.(h|hh|hpp):Dirs})
+    SRCS($_HEADERS)
+}
+
 ### @usage: CLANG_EMIT_AST_CXX_RUN_TOOL(Tool Args... [SOURCES ...] [OPTS ...] [IN ...] [IN_NOPARSE ...] [TOOL ...] [OUTPUT_INCLUDES ...] [INDUCED_DEPS ...] [IN_DEPS ...] [STDOUT out-file-name] [STDOUT_NOAUTO out-file-name] [CWD cwd])
 ###
 ### Emit Clang ASTs from .cpp files listed in SOURCES parameter (CXXFLAGS and LLVM_OPTS are passed in, while CFLAGS and C_FLAGS_PLATFORM are not) and run tool Tool with Args... .