From 1abc131a53daeecddfc670830266948901fe82dc Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 7 Jun 2021 14:39:38 +0200 Subject: 0.6.7 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 10b73f4f..6bcf89ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy(SET CMP0092 NEW) endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.6" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.7" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 -- cgit v1.2.3 From 607d8603b6d5b8409aa3f0275d8dfc8d0b5fbaa0 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 23 Jun 2021 13:41:44 +0200 Subject: Update to the new matrix-doc layout and tooling Among things affecting Quotient, the update involved moving API files from api/ to data/api/, adding extensions to event schema files, and switching from ReStructured Text to Markdown as a lightweight markup language. This commit updates the build system and GTAD configuration to accommodate for these. The build system is also more robust now in choosing whether the update-api target should be provided. Previously the target was provided whenever GTAD_PATH and MATRIX_DOC_PATH were specified, even if they did not point to anything valid. CMake now checks that MATRIX_DOC_PATH is an actual directory and that GTAD_PATH points to an actual file. --- CMakeLists.txt | 38 ++++++++++++++++++++++++-------------- gtad/gtad.yaml | 4 ++-- 2 files changed, 26 insertions(+), 16 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bcf89ce..db5eafe5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,18 +85,28 @@ else () message( STATUS "End-to-end encryption (E2EE) support is turned off.") endif () -if (GTAD_PATH) +if (GTAD_PATH AND MATRIX_DOC_PATH) get_filename_component(ABS_GTAD_PATH "${GTAD_PATH}" REALPATH) + if (EXISTS ${ABS_GTAD_PATH}) + get_filename_component(ABS_API_DEF_PATH "${MATRIX_DOC_PATH}/data/api" REALPATH) + message (STATUS "Testing ${ABS_API_DEF_PATH}") + if (NOT IS_DIRECTORY ${ABS_API_DEF_PATH}) + get_filename_component(ABS_API_DEF_PATH "${MATRIX_DOC_PATH}/api" REALPATH) + message (STATUS "Testing ${ABS_API_DEF_PATH}") + endif () + if (IS_DIRECTORY ${ABS_API_DEF_PATH}) + set(GENERATE_API 1) + if (NOT CLANG_FORMAT) + set(CLANG_FORMAT clang-format) + endif() + get_filename_component(ABS_CLANG_FORMAT "${CLANG_FORMAT}" PROGRAM) + else () + message( WARNING "${MATRIX_DOC_PATH} doesn't seem to point to a valid matrix-doc repo; disabling API stubs generation") + endif () + else (EXISTS ${ABS_GTAD_PATH}) + message( WARNING "${GTAD_PATH} doesn't exist; disabling API stubs generation") + endif () endif () -if (MATRIX_DOC_PATH) - get_filename_component(ABS_API_DEF_PATH "${MATRIX_DOC_PATH}/api" REALPATH) -endif () -if (ABS_GTAD_PATH AND ABS_API_DEF_PATH) - if (NOT CLANG_FORMAT) - set(CLANG_FORMAT clang-format) - endif() - get_filename_component(ABS_CLANG_FORMAT "${CLANG_FORMAT}" PROGRAM) -endif() message( STATUS ) message( STATUS "=============================================================================" ) @@ -110,11 +120,11 @@ message( STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_V message( STATUS "Install Prefix: ${CMAKE_INSTALL_PREFIX}" ) message( STATUS " Header files will be installed to ${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDEDIR}" ) message( STATUS "Using Qt ${Qt5_VERSION} at ${Qt5_Prefix}" ) -if (ABS_API_DEF_PATH AND ABS_GTAD_PATH) +if (GENERATE_API) message( STATUS "Generating API stubs enabled (use --target update-api)" ) message( STATUS " Using GTAD at ${ABS_GTAD_PATH}" ) message( STATUS " Using API files at ${ABS_API_DEF_PATH}" ) - if (ABS_CLANG_FORMAT) + if (EXISTS ${ABS_CLANG_FORMAT}) message( STATUS "clang-format is at ${ABS_CLANG_FORMAT}") else () message( STATUS "${CLANG_FORMAT} is NOT FOUND; API files won't be reformatted") @@ -190,7 +200,7 @@ set(FULL_CSAPI_DIR lib/${CSAPI_DIR}) set(ASAPI_DEF_DIR application-service/definitions) set(ISAPI_DEF_DIR identity/definitions) -if (MATRIX_DOC_PATH AND GTAD_PATH) +if (GENERATE_API) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0") # We use globbing with CONFIGURE_DEPENDS to produce two file lists: # one of all API files for clang-format and another of just .cpp @@ -222,7 +232,7 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) VERBATIM ) add_custom_target(update-api DEPENDS generate-unformatted-api) - if (ABS_CLANG_FORMAT) + if (EXISTS ${ABS_CLANG_FORMAT}) set(CLANG_FORMAT_ARGS -i -sort-includes ${CLANG_FORMAT_ARGS}) # FIXME: the list of files should be produced after GTAD has run. # For now it's produced at CMake invocation. If file() hasn't found diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml index adf5024a..d68cc8a0 100644 --- a/gtad/gtad.yaml +++ b/gtad/gtad.yaml @@ -85,7 +85,7 @@ analyzer: { type: RoomEventPtr, imports: "events/eventloader.h" } - /event.yaml$/: { type: EventPtr, imports: "events/eventloader.h" } - - /m\.room\.member$/: void # Skip resolving; see EventsArray<> below + - /m\.room\.member/: void # Skip resolving; see EventsArray<> below - '/^(\./)?definitions/request_email_validation.yaml$/': title: EmailValidationData - '/^(\./)?definitions/request_msisdn_validation.yaml$/': @@ -109,7 +109,7 @@ analyzer: - /^Notification|Result$/: type: "std::vector<{{1}}>" imports: "events/eventloader.h" - - /m\.room\.member$/: # Only used in an array (see also above) + - /m\.room\.member/: # Only used in an array (see also above) type: "EventsArray" imports: "events/roommemberevent.h" - /state_event.yaml$/: StateEvents -- cgit v1.2.3 From a83ec9004f52074ba43c17c1113f05db55584067 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 14 Jul 2021 14:28:12 +0200 Subject: CMakeLists: fixed potential linking errors around quotient_common.h quotient_common.h has Q_NAMESPACE but no own compilation unit, and moc was not called on it either - using metaobject data on an enumeration defined in that file leads to a linking error due to sharedMetaObject not being defined. The fix makes so that the file is detected by automoc with the respective definition being generated. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index db5eafe5..1e207478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,11 @@ message( STATUS ) # Set up source files set(lib_SRCS + # This .h is special in that it declares a Q_NAMESPACE but has no .cpp + # where staticMetaObject for that namespace would be defined; passing it + # to add_library (see below) puts it on the automoc radar, producing + # a compilation unit with the needed definition. + lib/quotient_common.h lib/networkaccessmanager.cpp lib/connectiondata.cpp lib/connection.cpp -- cgit v1.2.3 From 4f4387f91fd6efccf102e43aa593c09a9e50b42f Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 24 Aug 2021 03:52:25 +0200 Subject: 0.6.8 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e207478..00c15527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy(SET CMP0092 NEW) endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.7" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.8" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 -- cgit v1.2.3 From 31c72a8ed620904867755b5370d881053ba060a7 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 12 Sep 2021 06:29:25 +0200 Subject: 0.6.9 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 00c15527..bf8797ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy(SET CMP0092 NEW) endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.8" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.9" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 -- cgit v1.2.3 From de11927581864a140e3a60e1ff4e8100e4235a6c Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 3 Oct 2021 05:33:07 +0200 Subject: 0.6.10 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bf8797ae..4aa9a420 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy(SET CMP0092 NEW) endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.9" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.10" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 -- cgit v1.2.3 From 0a342369406e2d259ce20e5fa6d53ac271cbf3c2 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 6 Oct 2021 19:18:45 +0200 Subject: 0.6.11 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4aa9a420..5c1babc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy(SET CMP0092 NEW) endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.10" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.11" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 -- cgit v1.2.3