2017-02-01 19:32:13 +00:00
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2021-01-25 10:12:37 +00:00
|
|
|
qtPrepareLibExecTool(QMAKE_TRACEGEN, tracegen)
|
2017-02-01 19:32:13 +00:00
|
|
|
|
|
|
|
isEmpty(TRACEGEN_DIR): TRACEGEN_DIR = .
|
|
|
|
|
|
|
|
PROVIDER_NAME = qt$$lower($$MODULE)
|
|
|
|
INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
|
|
|
|
HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}
|
|
|
|
|
2019-10-09 12:48:53 +00:00
|
|
|
if(qtConfig(lttng)|qtConfig(etw)) {
|
2017-02-01 19:32:13 +00:00
|
|
|
SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}
|
|
|
|
|
|
|
|
isEmpty(BUILDS)|build_pass {
|
|
|
|
impl_file_contents = \
|
|
|
|
"$${LITERAL_HASH}define TRACEPOINT_CREATE_PROBES" \
|
|
|
|
"$${LITERAL_HASH}define TRACEPOINT_DEFINE" \
|
|
|
|
"$${LITERAL_HASH}include \"$${HEADER_PATH}\""
|
|
|
|
|
|
|
|
write_file($$SOURCE_PATH, impl_file_contents)|error()
|
|
|
|
}
|
|
|
|
|
|
|
|
GENERATED_SOURCES += $$SOURCE_PATH
|
|
|
|
|
|
|
|
tracegen.input = TRACEPOINT_PROVIDER
|
|
|
|
tracegen.output = $$HEADER_PATH
|
|
|
|
tracegen.variable_out = HEADERS
|
|
|
|
tracegen.depends += $$QMAKE_TRACEGEN_EXE
|
|
|
|
tracegen.CONFIG = target_predeps
|
|
|
|
|
|
|
|
qtConfig(lttng) {
|
|
|
|
tracegen.commands = $$QMAKE_TRACEGEN lttng ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
|
|
|
QMAKE_USE_PRIVATE += lttng-ust
|
|
|
|
} else {
|
|
|
|
tracegen.commands = $$QMAKE_TRACEGEN etw ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
|
|
|
}
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += tracegen
|
|
|
|
|
|
|
|
DEFINES += Q_TRACEPOINT
|
|
|
|
} else {
|
|
|
|
isEmpty(BUILDS)|build_pass {
|
|
|
|
header_file_contents = "$${LITERAL_HASH}include <private/qtrace_p.h>"
|
|
|
|
write_file($$HEADER_PATH, header_file_contents)|error()
|
|
|
|
}
|
|
|
|
}
|