diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-01 14:53:59 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-01 14:54:32 +0200 |
commit | 51d27f3bcaacefda78dc033021b6a85152ab972e (patch) | |
tree | 5e461c9c30bc1e6ee6394e57b325f579336e3eab | |
parent | 7ac93db4553aa624326a8e28b74151c784b937a7 (diff) | |
download | libquotient-51d27f3bcaacefda78dc033021b6a85152ab972e.tar.gz libquotient-51d27f3bcaacefda78dc033021b6a85152ab972e.zip |
GTAD parts: new home and format updates for GTAD 0.7
All GTAD-related files (gtad.yaml and templates) from now live in their
dedicated gtad/ directory - this helps against removing them
accidentally along with the rest of the generated files. The format
to list generated files in gtad.yaml has changed a bit before
GTAD 0.7 beta2; gtad.yaml in this commit conforms to the new structure.
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | gtad/gtad.yaml (renamed from lib/csapi/gtad.yaml) | 8 | ||||
-rw-r--r-- | gtad/preamble.mustache (renamed from lib/csapi/preamble.mustache) | 0 | ||||
-rw-r--r-- | gtad/template.cpp.mustache (renamed from lib/csapi/{{base}}.cpp.mustache) | 0 | ||||
-rw-r--r-- | gtad/template.h.mustache (renamed from lib/csapi/{{base}}.h.mustache) | 0 |
5 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 68e49a67..1e336673 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,7 +200,6 @@ endforeach() # new files you have to re-run cmake. # TODO: check `file(GLOB_RECURSE ... CONFIGURE_DEPENDS)` (from CMake 3.14) if (MATRIX_DOC_PATH AND GTAD_PATH) - set(FULL_CSAPI_DIR lib/${CSAPI_DIR}) set(FULL_CSAPI_SRC_DIR ${ABS_API_DEF_PATH}/client-server) file(GLOB_RECURSE API_DEFS RELATIVE ${PROJECT_SOURCE_DIR} ${FULL_CSAPI_SRC_DIR}/*.yaml @@ -208,15 +207,15 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) ${ABS_API_DEF_PATH}/${ISAPI_DEF_DIR}/*.yaml ) add_custom_target(update-api - ${ABS_GTAD_PATH} --config ${CSAPI_DIR}/gtad.yaml --out ${CSAPI_DIR} + ${ABS_GTAD_PATH} --config ../gtad/gtad.yaml --out ${CSAPI_DIR} ${FULL_CSAPI_SRC_DIR} old_sync.yaml- room_initial_sync.yaml- # deprecated search.yaml- # current GTAD is limited in handling move-only data sync.yaml- # we have a better handcrafted implementation WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/lib - SOURCES ${FULL_CSAPI_DIR}/gtad.yaml - ${FULL_CSAPI_DIR}/{{base}}.h.mustache - ${FULL_CSAPI_DIR}/{{base}}.cpp.mustache + SOURCES gtad/gtad.yaml + gtad/template.h.mustache + gtad/template.cpp.mustache ${API_DEFS} VERBATIM ) @@ -232,7 +231,7 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) COMMAND ${ABS_CLANG_FORMAT} ${CLANG_FORMAT_ARGS} ${api_HDRS} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} VERBATIM - COMMENT Formatting files + COMMENT "Formatting files" ) endif() endif() diff --git a/lib/csapi/gtad.yaml b/gtad/gtad.yaml index 086bd4f7..51f9e26b 100644 --- a/lib/csapi/gtad.yaml +++ b/gtad/gtad.yaml @@ -158,8 +158,12 @@ mustache: *{{/summary}} templates: - - "{{base}}.h.mustache" - - "{{base}}.cpp.mustache" + data: + .h: "{{>template.h.mustache}}" + .cpp: "{{>template.cpp.mustache}}" + api: + .h: "{{>template.h.mustache}}" + .cpp: "{{>template.cpp.mustache}}" #outFilesList: apifiles.txt diff --git a/lib/csapi/preamble.mustache b/gtad/preamble.mustache index 3ba87d61..3ba87d61 100644 --- a/lib/csapi/preamble.mustache +++ b/gtad/preamble.mustache diff --git a/lib/csapi/{{base}}.cpp.mustache b/gtad/template.cpp.mustache index b3bd4de9..b3bd4de9 100644 --- a/lib/csapi/{{base}}.cpp.mustache +++ b/gtad/template.cpp.mustache diff --git a/lib/csapi/{{base}}.h.mustache b/gtad/template.h.mustache index 404aafe8..404aafe8 100644 --- a/lib/csapi/{{base}}.h.mustache +++ b/gtad/template.h.mustache |