mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
chore(build): improve include paths
This commit is contained in:
parent
3d5794ed7c
commit
118d20c49d
30 changed files with 54 additions and 55 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef STORM_ARRAY_HPP
|
#ifndef STORM_ARRAY_HPP
|
||||||
#define STORM_ARRAY_HPP
|
#define STORM_ARRAY_HPP
|
||||||
|
|
||||||
#include "array/TSBaseArray.hpp"
|
#include "storm/array/TSBaseArray.hpp"
|
||||||
#include "array/TSFixedArray.hpp"
|
#include "storm/array/TSFixedArray.hpp"
|
||||||
#include "array/TSGrowableArray.hpp"
|
#include "storm/array/TSGrowableArray.hpp"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,5 @@ add_library(storm STATIC
|
||||||
|
|
||||||
target_include_directories(storm
|
target_include_directories(storm
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/storm
|
${PROJECT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#ifndef STORM_LIST_HPP
|
#ifndef STORM_LIST_HPP
|
||||||
#define STORM_LIST_HPP
|
#define STORM_LIST_HPP
|
||||||
|
|
||||||
#include "list/TSExplicitList.hpp"
|
#include "storm/list/TSExplicitList.hpp"
|
||||||
#include "list/TSLink.hpp"
|
#include "storm/list/TSLink.hpp"
|
||||||
#include "list/TSLinkedNode.hpp"
|
#include "storm/list/TSLinkedNode.hpp"
|
||||||
#include "list/TSList.hpp"
|
#include "storm/list/TSList.hpp"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
|
|
||||||
constexpr size_t ALIGNMENT = 8;
|
constexpr size_t ALIGNMENT = 8;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "String.hpp"
|
#include "storm/String.hpp"
|
||||||
#include "Error.hpp"
|
#include "storm/Error.hpp"
|
||||||
|
|
||||||
size_t SStrCopy(char* dest, const char* source, size_t destsize) {
|
size_t SStrCopy(char* dest, const char* source, size_t destsize) {
|
||||||
STORM_ASSERT(dest);
|
STORM_ASSERT(dest);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef STORM_THREAD_HPP
|
#ifndef STORM_THREAD_HPP
|
||||||
#define STORM_THREAD_HPP
|
#define STORM_THREAD_HPP
|
||||||
|
|
||||||
#include "thread/SCritSect.hpp"
|
#include "storm/thread/SCritSect.hpp"
|
||||||
#include "thread/SEvent.hpp"
|
#include "storm/thread/SEvent.hpp"
|
||||||
#include "thread/SSyncObject.hpp"
|
#include "storm/thread/SSyncObject.hpp"
|
||||||
#include "thread/SThread.hpp"
|
#include "storm/thread/SThread.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName);
|
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef STORM_ARRAY_TS_FIXED_ARRAY_HPP
|
#ifndef STORM_ARRAY_TS_FIXED_ARRAY_HPP
|
||||||
#define STORM_ARRAY_TS_FIXED_ARRAY_HPP
|
#define STORM_ARRAY_TS_FIXED_ARRAY_HPP
|
||||||
|
|
||||||
#include "array/TSBaseArray.hpp"
|
#include "storm/array/TSBaseArray.hpp"
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_ARRAY_TS_GROWABLE_ARRAY_HPP
|
#ifndef STORM_ARRAY_TS_GROWABLE_ARRAY_HPP
|
||||||
#define STORM_ARRAY_TS_GROWABLE_ARRAY_HPP
|
#define STORM_ARRAY_TS_GROWABLE_ARRAY_HPP
|
||||||
|
|
||||||
#include "array/TSFixedArray.hpp"
|
#include "storm/array/TSFixedArray.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef STORM_LIST_TS_EXPLICIT_LIST_HPP
|
#ifndef STORM_LIST_TS_EXPLICIT_LIST_HPP
|
||||||
#define STORM_LIST_TS_EXPLICIT_LIST_HPP
|
#define STORM_LIST_TS_EXPLICIT_LIST_HPP
|
||||||
|
|
||||||
#include "list/TSGetExplicitLink.hpp"
|
#include "storm/list/TSGetExplicitLink.hpp"
|
||||||
#include "list/TSList.hpp"
|
#include "storm/list/TSList.hpp"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#define STORM_EXPLICIT_LIST(T, link) TSExplicitList<T, offsetof(T, link)>
|
#define STORM_EXPLICIT_LIST(T, link) TSExplicitList<T, offsetof(T, link)>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_LIST_TS_GET_EXPLICIT_LINK_HPP
|
#ifndef STORM_LIST_TS_GET_EXPLICIT_LINK_HPP
|
||||||
#define STORM_LIST_TS_GET_EXPLICIT_LINK_HPP
|
#define STORM_LIST_TS_GET_EXPLICIT_LINK_HPP
|
||||||
|
|
||||||
#include "list/TSLink.hpp"
|
#include "storm/list/TSLink.hpp"
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef STORM_LIST_TS_GET_LINK_HPP
|
#ifndef STORM_LIST_TS_GET_LINK_HPP
|
||||||
#define STORM_LIST_TS_GET_LINK_HPP
|
#define STORM_LIST_TS_GET_LINK_HPP
|
||||||
|
|
||||||
#include "list/TSLink.hpp"
|
#include "storm/list/TSLink.hpp"
|
||||||
#include "list/TSLinkedNode.hpp"
|
#include "storm/list/TSLinkedNode.hpp"
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_LIST_TS_LINKED_NODE_HPP
|
#ifndef STORM_LIST_TS_LINKED_NODE_HPP
|
||||||
#define STORM_LIST_TS_LINKED_NODE_HPP
|
#define STORM_LIST_TS_LINKED_NODE_HPP
|
||||||
|
|
||||||
#include "list/TSLink.hpp"
|
#include "storm/list/TSLink.hpp"
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class TSLinkedNode {
|
class TSLinkedNode {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#ifndef STORM_LIST_TS_LIST_HPP
|
#ifndef STORM_LIST_TS_LIST_HPP
|
||||||
#define STORM_LIST_TS_LIST_HPP
|
#define STORM_LIST_TS_LIST_HPP
|
||||||
|
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
#include "list/TSGetLink.hpp"
|
#include "storm/list/TSGetLink.hpp"
|
||||||
#include "list/TSLink.hpp"
|
#include "storm/list/TSLink.hpp"
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "thread/SCritSect.hpp"
|
#include "storm/thread/SCritSect.hpp"
|
||||||
|
|
||||||
void SCritSect::Enter() {
|
void SCritSect::Enter() {
|
||||||
#if defined(PLATFORM_WIN)
|
#if defined(PLATFORM_WIN)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "thread/SEvent.hpp"
|
#include "storm/thread/SEvent.hpp"
|
||||||
|
|
||||||
SEvent::SEvent(int32_t manualReset, int32_t initialValue)
|
SEvent::SEvent(int32_t manualReset, int32_t initialValue)
|
||||||
: SSyncObject() {
|
: SSyncObject() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_THREAD_S_EVENT_HPP
|
#ifndef STORM_THREAD_S_EVENT_HPP
|
||||||
#define STORM_THREAD_S_EVENT_HPP
|
#define STORM_THREAD_S_EVENT_HPP
|
||||||
|
|
||||||
#include "thread/SSyncObject.hpp"
|
#include "storm/thread/SSyncObject.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class SEvent : public SSyncObject {
|
class SEvent : public SSyncObject {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "thread/SSyncObject.hpp"
|
#include "storm/thread/SSyncObject.hpp"
|
||||||
|
|
||||||
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "thread/SThread.hpp"
|
#include "storm/thread/SThread.hpp"
|
||||||
#include "Thread.hpp"
|
#include "storm/Thread.hpp"
|
||||||
|
|
||||||
int32_t SThread::Create(uint32_t (*threadProc)(void*), void* param, SThread& thread, char* threadName, uint32_t a5) {
|
int32_t SThread::Create(uint32_t (*threadProc)(void*), void* param, SThread& thread, char* threadName, uint32_t a5) {
|
||||||
#if defined(PLATFORM_WIN)
|
#if defined(PLATFORM_WIN)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_THREAD_S_THREAD_HPP
|
#ifndef STORM_THREAD_S_THREAD_HPP
|
||||||
#define STORM_THREAD_S_THREAD_HPP
|
#define STORM_THREAD_S_THREAD_HPP
|
||||||
|
|
||||||
#include "thread/SSyncObject.hpp"
|
#include "storm/thread/SSyncObject.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class SThread : public SSyncObject {
|
class SThread : public SSyncObject {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "thread/S_Thread.hpp"
|
#include "storm/thread/S_Thread.hpp"
|
||||||
|
|
||||||
int32_t S_Thread::s_numthreads;
|
int32_t S_Thread::s_numthreads;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STORM_THREAD_S__THREAD_HPP
|
#ifndef STORM_THREAD_S__THREAD_HPP
|
||||||
#define STORM_THREAD_S__THREAD_HPP
|
#define STORM_THREAD_S__THREAD_HPP
|
||||||
|
|
||||||
#include "thread/SThread.hpp"
|
#include "storm/thread/SThread.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
typedef SThread SyncObjectData;
|
typedef SThread SyncObjectData;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "thread/mac/SThreadRunner.h"
|
#include "storm/thread/mac/SThreadRunner.h"
|
||||||
#include "thread/S_Thread.hpp"
|
#include "storm/thread/S_Thread.hpp"
|
||||||
|
|
||||||
@implementation SThreadRunner
|
@implementation SThreadRunner
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "thread/S_Thread.hpp"
|
#include "storm/thread/S_Thread.hpp"
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
|
|
||||||
uint32_t S_Thread::s_SLaunchThread(void* threadParam) {
|
uint32_t S_Thread::s_SLaunchThread(void* threadParam) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include "Thread.hpp"
|
#include "storm/Thread.hpp"
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
#include "String.hpp"
|
#include "storm/String.hpp"
|
||||||
#include "thread/S_Thread.hpp"
|
#include "storm/thread/S_Thread.hpp"
|
||||||
#include "thread/mac/SThreadRunner.h"
|
#include "storm/thread/mac/SThreadRunner.h"
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName) {
|
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "Array.hpp"
|
#include "storm/Array.hpp"
|
||||||
#include "Test.hpp"
|
#include "test/Test.hpp"
|
||||||
|
|
||||||
TEST_CASE("TSBaseArray", "[list]") {
|
TEST_CASE("TSBaseArray", "[list]") {
|
||||||
SECTION("constructs correctly") {
|
SECTION("constructs correctly") {
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,7 @@ endif()
|
||||||
|
|
||||||
target_include_directories(StormTest
|
target_include_directories(StormTest
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/storm
|
${PROJECT_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/test
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS StormTest DESTINATION "bin")
|
install(TARGETS StormTest DESTINATION "bin")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "List.hpp"
|
#include "storm/List.hpp"
|
||||||
#include "Test.hpp"
|
#include "test/Test.hpp"
|
||||||
|
|
||||||
struct TestListNode : TSLinkedNode<TestListNode> {
|
struct TestListNode : TSLinkedNode<TestListNode> {
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "Memory.hpp"
|
#include "storm/Memory.hpp"
|
||||||
#include "Test.hpp"
|
#include "test/Test.hpp"
|
||||||
|
|
||||||
TEST_CASE("SMemAlloc", "[memory]") {
|
TEST_CASE("SMemAlloc", "[memory]") {
|
||||||
SECTION("allocates memory") {
|
SECTION("allocates memory") {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "Test.hpp"
|
#include "test/Test.hpp"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
#include "catch.hpp"
|
#include "test/catch.hpp"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue