mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
build: Make this modules stuff actually mostly work on Clang
This commit is contained in:
@@ -32,6 +32,7 @@ include("${IMHEX_BASE_FOLDER}/cmake/ide_helpers.cmake")
|
||||
|
||||
# Basic compiler and cmake configurations
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_SCAN_FOR_MODULES ON)
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
|
||||
|
||||
@@ -665,6 +665,7 @@ macro(setupCompilerFlags target)
|
||||
addCCXXFlag("-Wno-array-bounds" ${target})
|
||||
addCCXXFlag("-Wno-deprecated-declarations" ${target})
|
||||
addCCXXFlag("-Wno-unknown-pragmas" ${target})
|
||||
addCXXFlag("-Wno-include-angled-in-module-purview" ${target})
|
||||
|
||||
# Enable hardening flags
|
||||
addCommonFlag("-U_FORTIFY_SOURCE" ${target})
|
||||
|
||||
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
Submodule lib/external/pattern_language updated: 72e9b93c8f...831a49f6b7
@@ -17,22 +17,35 @@ module;
|
||||
#include <ranges>
|
||||
#include <fstream>
|
||||
#include <thread>
|
||||
#include <future>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wolv/io/file.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
|
||||
#include <hex/helpers/auto_reset.hpp>
|
||||
#include <hex/api/event_manager.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/providers/provider_data.hpp>
|
||||
#include <hex/data_processor/node.hpp>
|
||||
#include <hex/data_processor/link.hpp>
|
||||
#include <hex/data_processor/attribute.hpp>
|
||||
#include <pl/pattern_language.hpp>
|
||||
|
||||
export module hex;
|
||||
|
||||
#define HEX_MODULE_EXPORT
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/event_manager.hpp>
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
#include <hex/api/layout_manager.hpp>
|
||||
#include <hex/api/localization_manager.hpp>
|
||||
#include <hex/api/plugin_manager.hpp>
|
||||
#include <hex/api/shortcut_manager.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/theme_manager.hpp>
|
||||
#include <hex/api/tutorial_manager.hpp>
|
||||
#include <hex/api/workspace_manager.hpp>
|
||||
#include <hex/api/workspace_manager.hpp>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <hex/api/localization_manager.hpp>
|
||||
#include <hex/helpers/auto_reset.hpp>
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class AchievementManager;
|
||||
|
||||
|
||||
@@ -16,27 +16,31 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wolv/io/fs.hpp>
|
||||
|
||||
using ImGuiDataType = int;
|
||||
using ImGuiInputTextFlags = int;
|
||||
struct ImColor;
|
||||
enum ImGuiCustomCol : int;
|
||||
typedef int ImGuiColorEditFlags;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
using ImGuiDataType = int;
|
||||
using ImGuiInputTextFlags = int;
|
||||
struct ImColor;
|
||||
enum ImGuiCustomCol : int;
|
||||
typedef int ImGuiColorEditFlags;
|
||||
#endif
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class View;
|
||||
class Task;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
class View;
|
||||
class Task;
|
||||
|
||||
namespace dp {
|
||||
class Node;
|
||||
}
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
namespace dp {
|
||||
class Node;
|
||||
}
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
|
||||
namespace LocalizationManager {
|
||||
class LanguageDefinition;
|
||||
}
|
||||
namespace LocalizationManager {
|
||||
class LanguageDefinition;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
The Content Registry is the heart of all features in ImHex that are in some way extendable by Plugins.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define EVENT_DEF_NO_LOG(event_name, ...) EVENT_DEF_IMPL(event_name, #event_name, false, __VA_ARGS__)
|
||||
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
namespace impl {
|
||||
|
||||
|
||||
@@ -14,21 +14,25 @@
|
||||
#include <set>
|
||||
#include <memory>
|
||||
|
||||
using ImGuiID = unsigned int;
|
||||
struct ImVec2;
|
||||
struct ImFontAtlas;
|
||||
struct ImFont;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
using ImGuiID = unsigned int;
|
||||
struct ImVec2;
|
||||
struct ImFontAtlas;
|
||||
struct ImFont;
|
||||
#endif
|
||||
struct GLFWwindow;
|
||||
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
namespace impl {
|
||||
class AutoResetBase;
|
||||
}
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
namespace impl {
|
||||
class AutoResetBase;
|
||||
}
|
||||
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace ImHexApi {
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
struct ImGuiTextBuffer;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
struct ImGuiTextBuffer;
|
||||
#endif
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class LayoutManager {
|
||||
public:
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/helpers/auto_reset.hpp>
|
||||
|
||||
struct ImGuiContext;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
struct ImGuiContext;
|
||||
#endif
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
struct SubCommand {
|
||||
enum class Type : u8 {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* that want to store any data to a Project File.
|
||||
*
|
||||
*/
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
namespace prv {
|
||||
class Provider;
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
struct ImGuiWindow;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
struct ImGuiWindow;
|
||||
#endif
|
||||
|
||||
struct KeyEquivalent {
|
||||
bool valid;
|
||||
@@ -17,7 +19,7 @@ struct KeyEquivalent {
|
||||
int key;
|
||||
};
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class View;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <condition_variable>
|
||||
#include <source_location>
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class TaskHolder;
|
||||
class TaskManager;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <nlohmann/json_fwd.hpp>
|
||||
#include <imgui.h>
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
/**
|
||||
* @brief The Theme Manager takes care of loading and applying themes
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class TutorialManager {
|
||||
public:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace hex {
|
||||
EXPORT_MODULE namespace hex {
|
||||
|
||||
class WorkspaceManager {
|
||||
public:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <wolv/io/file.hpp>
|
||||
#include <wolv/utils/guards.hpp>
|
||||
|
||||
namespace hex::log {
|
||||
EXPORT_MODULE namespace hex::log {
|
||||
|
||||
namespace impl {
|
||||
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] std::vector<std::vector<T>> sampleChannels(const std::vector<T> &data, size_t count, size_t channels) {
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#if defined(OS_MACOS)
|
||||
|
||||
struct GLFWwindow;
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
struct GLFWwindow;
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
#if !defined(HEX_MODULE_EXPORT)
|
||||
namespace prv {
|
||||
class Provider;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
class PerProvider {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/api/localization_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/providers/undo_redo/operations/operation.hpp>
|
||||
|
||||
@@ -35,7 +34,6 @@ namespace hex::prv::undo {
|
||||
template<std::derived_from<Operation> T>
|
||||
bool add(auto && ... args) {
|
||||
auto result = this->add(std::make_unique<T>(std::forward<decltype(args)>(args)...));
|
||||
EventDataChanged::post(m_provider);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <hex/api/events/requests_lifecycle.hpp>
|
||||
#include <hex/api/events/requests_provider.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <bit>
|
||||
#include <span>
|
||||
|
||||
#if MBEDTLS_VERSION_MAJOR <= 2
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/api/events/events_provider.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <hex/providers/undo_redo/stack.hpp>
|
||||
#include <hex/providers/undo_redo/operations/operation_group.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
@@ -122,6 +123,8 @@ namespace hex::prv::undo {
|
||||
// Do the operation
|
||||
this->getLastOperation()->redo(m_provider);
|
||||
|
||||
EventDataChanged::post(m_provider);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
#include <hex/api/events/events_gui.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
|
||||
#include <hex/helpers/utils_macos.hpp>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hex/api/events/events_provider.hpp>
|
||||
#include <hex/api/events/events_lifecycle.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/helpers/crypto.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <wolv/literals.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/data_processor/node.hpp>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <hex/api/events/events_provider.hpp>
|
||||
#include <hex/api/events/events_lifecycle.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
#include <hex/api/events/events_gui.hpp>
|
||||
#include <hex/api/events/requests_lifecycle.hpp>
|
||||
#include <hex/api/events/requests_interaction.hpp>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <toasts/toast_notification.hpp>
|
||||
#include <popups/popup_text_input.hpp>
|
||||
#include <hex/api/workspace_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <wolv/io/file.hpp>
|
||||
#include <wolv/literals.hpp>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <toasts/toast_notification.hpp>
|
||||
|
||||
#include <csignal>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
@@ -553,4 +554,4 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/events/requests_interaction.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <wolv/utils/guards.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include "imstb_textedit.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/helpers/default_paths.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <hex/api/events/events_provider.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/providers/buffered_reader.hpp>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
#include <hex/api/events/events_provider.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <wolv/utils/guards.hpp>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/providers/provider.hpp>
|
||||
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <content/providers/undo_operations/operation_write.hpp>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/providers/memory_provider.hpp>
|
||||
#include <hex/api/events/requests_interaction.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <hex/api_urls.hpp>
|
||||
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <popups/popup_notification.hpp>
|
||||
#include <toasts/toast_notification.hpp>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/theme_manager.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <wolv/io/file.hpp>
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
#include <hex/api/events/events_gui.hpp>
|
||||
#include <hex/api/events/requests_gui.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/ui/view.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
#include <hex/providers/memory_provider.hpp>
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <hex/helpers/crypto.hpp>
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/helpers/encoding_file.hpp>
|
||||
|
||||
#include <hex/api/events/events_interaction.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <hex/ui/view.hpp>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <content/yara_rule.hpp>
|
||||
#include <romfs/romfs.hpp>
|
||||
#include <wolv/io/file.hpp>
|
||||
|
||||
namespace hex::plugin::yara {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user