Decrease compile time (#886)

This commit is contained in:
Murat Seker 2020-07-21 19:35:25 +02:00 committed by GitHub
parent d6573048e7
commit 6362cfcc1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -61,13 +61,15 @@ message(STATUS "Using flatbuffers compiler: " ${FLATBUFFERS_FLATC_EXECUTABLE})
function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR) function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS}) string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
set_property(SOURCE ${GEN_HEADER} PROPERTY SKIP_AUTOMOC ON) set_property(SOURCE ${GEN_HEADER} PROPERTY SKIP_AUTOMOC ON)
if (ENABLE_AMLOGIC) if (ENABLE_AMLOGIC)
add_custom_command( add_custom_command(
OUTPUT ${GEN_HEADER} OUTPUT ${GEN_HEADER}
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
--gen-object-api --gen-object-api
-o "${OUTPUT_DIR}" -o "${OUTPUT_DIR}"
"${SRC_FBS}") "${SRC_FBS}"
DEPENDS ${SRC_FBS})
else() else()
add_custom_command( add_custom_command(
OUTPUT ${GEN_HEADER} OUTPUT ${GEN_HEADER}
@ -75,7 +77,7 @@ function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
--gen-object-api --gen-object-api
-o "${OUTPUT_DIR}" -o "${OUTPUT_DIR}"
"${SRC_FBS}" "${SRC_FBS}"
DEPENDS flatc) DEPENDS flatc ${SRC_FBS})
endif() endif()
endfunction() endfunction()

View File

@ -14,9 +14,12 @@
#include <utils/VideoMode.h> #include <utils/VideoMode.h>
#include <utils/Logger.h> #include <utils/Logger.h>
// flatbuffer FBS #include <flatbuffers/flatbuffers.h>
#include "hyperion_reply_generated.h"
#include "hyperion_request_generated.h" namespace hyperionnet
{
class Reply;
}
/// ///
/// Connection class to setup an connection to the hyperion server and execute commands. /// Connection class to setup an connection to the hyperion server and execute commands.

View File

@ -7,6 +7,10 @@
// flatbuffer includes // flatbuffer includes
#include <flatbufserver/FlatBufferConnection.h> #include <flatbufserver/FlatBufferConnection.h>
// flatbuffer FBS
#include "hyperion_reply_generated.h"
#include "hyperion_request_generated.h"
FlatBufferConnection::FlatBufferConnection(const QString& origin, const QString & address, const int& priority, const bool& skipReply) FlatBufferConnection::FlatBufferConnection(const QString& origin, const QString & address, const int& priority, const bool& skipReply)
: _socket() : _socket()
, _origin(origin) , _origin(origin)