Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if(ENABLE_SANITIZERS)
add_link_options(-fsanitize=address,undefined)
endif()

# disable <regex> in cxxopts to silence compile warnings
add_compile_options(-DCXXOPTS_NO_REGEX)

# Enable testing support
enable_testing()

Expand Down Expand Up @@ -163,6 +166,11 @@ configure_file(
# =============================================================================
# Generate database headers / implementations
# =============================================================================
if(NOT DEFINED MUDITOR_DIR)
set(MUDITOR_DIR ${CMAKE_CURRENT_LIST_DIR}/../muditor)
endif()


find_package(Python3 REQUIRED COMPONENTS Interpreter)
execute_process(
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scripts/generate_db_headers.py --list
Expand All @@ -180,7 +188,7 @@ list(FILTER DB_HEADERS INCLUDE REGEX "hpp$")
add_custom_command(
OUTPUT ${DB_SOURCES} ${DB_HEADERS}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scripts/generate_db_headers.py
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../muditor/packages/db/prisma/schema.prisma
DEPENDS ${MUDITOR_DIR}/packages/db/prisma/schema.prisma
${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_db_headers.py
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_db_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def generate_enums(self, group_name: str, basename: str) -> tuple[str, str]:
'',
'#include <string_view>',
'#include <optional>',
'#include <unordered_map>',
'',
'namespace db {',
'',
Expand All @@ -325,6 +324,7 @@ def generate_enums(self, group_name: str, basename: str) -> tuple[str, str]:
' */',
'',
f'#include "database/generated/{basename}.hpp"',
'#include <unordered_map>',
'',
'namespace db {',
'',
Expand Down
3 changes: 2 additions & 1 deletion src/scripting/script_timer_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <string>

#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
#include <sol/forward.hpp>
#include <sol/function.hpp>

namespace FieryMUD {

Expand Down
7 changes: 6 additions & 1 deletion tests/common/lightweight_test_harness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
#include <chrono>
#include <iostream>
#include <memory>
#include <regex>
#include <string>
#include <vector>

// Silence spurious warnings in <regex> header
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <regex>
#pragma GCC diagnostic pop

#include <catch2/catch_test_macros.hpp>
#include <fmt/format.h>
#include <magic_enum/magic_enum.hpp>
Expand Down