Improves build process for internal development

Adds an INTERNAL preprocessor definition to manage dependencies.

This change allows for a lighter build during internal development by
forward declaring some classes and excluding UI and CAN dependencies.
This commit is contained in:
2026-02-14 14:32:10 +01:00
parent 0cdd276194
commit fe0ee989e9
2 changed files with 13 additions and 2 deletions
+2
View File
@@ -1,4 +1,6 @@
#define INTERNAL
#include "simulator_base.hpp"
#include "ui_item.hpp"
Simulator_base::Simulator_base(std::string name, Communication *com, std::chrono::milliseconds interval,
QObject *parent)
+11 -2
View File
@@ -1,12 +1,21 @@
#pragma once
#include "UI.hpp"
#include "spdlog/spdlog.h"
#include "ui.hpp"
#include <QSerialPort>
#include <QThread>
#include <QTimer>
#ifndef INTERNAL
#include "ui.hpp"
#else
#include <nlohmann/json.hpp>
using json = nlohmann::json;
Q_FORWARD_DECLARE_OBJC_CLASS(CAN_Wrapper);
Q_FORWARD_DECLARE_OBJC_CLASS(UI_item);
#endif
#define PUSH_UI_ITEM(item) push_ui_item(&item)
#define EXPORT_SIM(sim) \
extern "C" Q_DECL_EXPORT Simulator_base *get_sim(Communication *com, QObject *parent) \