chore(build): improve include paths

This commit is contained in:
fallenoak 2020-11-01 17:45:45 -06:00
parent 3d5794ed7c
commit 118d20c49d
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
30 changed files with 54 additions and 55 deletions

View file

@ -1,8 +1,8 @@
#ifndef STORM_ARRAY_HPP
#define STORM_ARRAY_HPP
#include "array/TSBaseArray.hpp"
#include "array/TSFixedArray.hpp"
#include "array/TSGrowableArray.hpp"
#include "storm/array/TSBaseArray.hpp"
#include "storm/array/TSFixedArray.hpp"
#include "storm/array/TSGrowableArray.hpp"
#endif

View file

@ -19,5 +19,5 @@ add_library(storm STATIC
target_include_directories(storm
PRIVATE
${CMAKE_SOURCE_DIR}/storm
${PROJECT_SOURCE_DIR}
)

View file

@ -1,9 +1,9 @@
#ifndef STORM_LIST_HPP
#define STORM_LIST_HPP
#include "list/TSExplicitList.hpp"
#include "list/TSLink.hpp"
#include "list/TSLinkedNode.hpp"
#include "list/TSList.hpp"
#include "storm/list/TSExplicitList.hpp"
#include "storm/list/TSLink.hpp"
#include "storm/list/TSLinkedNode.hpp"
#include "storm/list/TSList.hpp"
#endif

View file

@ -1,4 +1,4 @@
#include "Memory.hpp"
#include "storm/Memory.hpp"
constexpr size_t ALIGNMENT = 8;

View file

@ -1,5 +1,5 @@
#include "String.hpp"
#include "Error.hpp"
#include "storm/String.hpp"
#include "storm/Error.hpp"
size_t SStrCopy(char* dest, const char* source, size_t destsize) {
STORM_ASSERT(dest);

View file

@ -1,10 +1,10 @@
#ifndef STORM_THREAD_HPP
#define STORM_THREAD_HPP
#include "thread/SCritSect.hpp"
#include "thread/SEvent.hpp"
#include "thread/SSyncObject.hpp"
#include "thread/SThread.hpp"
#include "storm/thread/SCritSect.hpp"
#include "storm/thread/SEvent.hpp"
#include "storm/thread/SSyncObject.hpp"
#include "storm/thread/SThread.hpp"
#include <cstdint>
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName);

View file

@ -1,8 +1,8 @@
#ifndef STORM_ARRAY_TS_FIXED_ARRAY_HPP
#define STORM_ARRAY_TS_FIXED_ARRAY_HPP
#include "array/TSBaseArray.hpp"
#include "Memory.hpp"
#include "storm/array/TSBaseArray.hpp"
#include "storm/Memory.hpp"
#include <cstdint>
template<class T>

View file

@ -1,7 +1,7 @@
#ifndef 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 <cstdint>
#include <cstring>

View file

@ -1,8 +1,8 @@
#ifndef STORM_LIST_TS_EXPLICIT_LIST_HPP
#define STORM_LIST_TS_EXPLICIT_LIST_HPP
#include "list/TSGetExplicitLink.hpp"
#include "list/TSList.hpp"
#include "storm/list/TSGetExplicitLink.hpp"
#include "storm/list/TSList.hpp"
#include <cstdlib>
#define STORM_EXPLICIT_LIST(T, link) TSExplicitList<T, offsetof(T, link)>

View file

@ -1,7 +1,7 @@
#ifndef 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 <cstdint>

View file

@ -1,8 +1,8 @@
#ifndef STORM_LIST_TS_GET_LINK_HPP
#define STORM_LIST_TS_GET_LINK_HPP
#include "list/TSLink.hpp"
#include "list/TSLinkedNode.hpp"
#include "storm/list/TSLink.hpp"
#include "storm/list/TSLinkedNode.hpp"
#include <cstddef>
#include <cstdint>

View file

@ -1,7 +1,7 @@
#ifndef 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>
class TSLinkedNode {

View file

@ -1,9 +1,9 @@
#ifndef STORM_LIST_TS_LIST_HPP
#define STORM_LIST_TS_LIST_HPP
#include "Memory.hpp"
#include "list/TSGetLink.hpp"
#include "list/TSLink.hpp"
#include "storm/Memory.hpp"
#include "storm/list/TSGetLink.hpp"
#include "storm/list/TSLink.hpp"
#include <cstddef>
#include <cstdint>

View file

@ -1,4 +1,4 @@
#include "thread/SCritSect.hpp"
#include "storm/thread/SCritSect.hpp"
void SCritSect::Enter() {
#if defined(PLATFORM_WIN)

View file

@ -1,4 +1,4 @@
#include "thread/SEvent.hpp"
#include "storm/thread/SEvent.hpp"
SEvent::SEvent(int32_t manualReset, int32_t initialValue)
: SSyncObject() {

View file

@ -1,7 +1,7 @@
#ifndef STORM_THREAD_S_EVENT_HPP
#define STORM_THREAD_S_EVENT_HPP
#include "thread/SSyncObject.hpp"
#include "storm/thread/SSyncObject.hpp"
#include <cstdint>
class SEvent : public SSyncObject {

View file

@ -1,4 +1,4 @@
#include "thread/SSyncObject.hpp"
#include "storm/thread/SSyncObject.hpp"
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
#include <cerrno>

View file

@ -1,5 +1,5 @@
#include "thread/SThread.hpp"
#include "Thread.hpp"
#include "storm/thread/SThread.hpp"
#include "storm/Thread.hpp"
int32_t SThread::Create(uint32_t (*threadProc)(void*), void* param, SThread& thread, char* threadName, uint32_t a5) {
#if defined(PLATFORM_WIN)

View file

@ -1,7 +1,7 @@
#ifndef STORM_THREAD_S_THREAD_HPP
#define STORM_THREAD_S_THREAD_HPP
#include "thread/SSyncObject.hpp"
#include "storm/thread/SSyncObject.hpp"
#include <cstdint>
class SThread : public SSyncObject {

View file

@ -1,4 +1,4 @@
#include "thread/S_Thread.hpp"
#include "storm/thread/S_Thread.hpp"
int32_t S_Thread::s_numthreads;

View file

@ -1,7 +1,7 @@
#ifndef STORM_THREAD_S__THREAD_HPP
#define STORM_THREAD_S__THREAD_HPP
#include "thread/SThread.hpp"
#include "storm/thread/SThread.hpp"
#include <cstdint>
typedef SThread SyncObjectData;

View file

@ -1,5 +1,5 @@
#include "thread/mac/SThreadRunner.h"
#include "thread/S_Thread.hpp"
#include "storm/thread/mac/SThreadRunner.h"
#include "storm/thread/S_Thread.hpp"
@implementation SThreadRunner

View file

@ -1,5 +1,5 @@
#include "thread/S_Thread.hpp"
#include "Memory.hpp"
#include "storm/thread/S_Thread.hpp"
#include "storm/Memory.hpp"
uint32_t S_Thread::s_SLaunchThread(void* threadParam) {
// TODO

View file

@ -1,8 +1,8 @@
#include "Thread.hpp"
#include "Memory.hpp"
#include "String.hpp"
#include "thread/S_Thread.hpp"
#include "thread/mac/SThreadRunner.h"
#include "storm/Thread.hpp"
#include "storm/Memory.hpp"
#include "storm/String.hpp"
#include "storm/thread/S_Thread.hpp"
#include "storm/thread/mac/SThreadRunner.h"
#include <new>
int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName) {

View file

@ -1,5 +1,5 @@
#include "Array.hpp"
#include "Test.hpp"
#include "storm/Array.hpp"
#include "test/Test.hpp"
TEST_CASE("TSBaseArray", "[list]") {
SECTION("constructs correctly") {

View file

@ -27,8 +27,7 @@ endif()
target_include_directories(StormTest
PRIVATE
${CMAKE_SOURCE_DIR}/storm
${CMAKE_SOURCE_DIR}/test
${PROJECT_SOURCE_DIR}
)
install(TARGETS StormTest DESTINATION "bin")

View file

@ -1,5 +1,5 @@
#include "List.hpp"
#include "Test.hpp"
#include "storm/List.hpp"
#include "test/Test.hpp"
struct TestListNode : TSLinkedNode<TestListNode> {
uint32_t index = 0;

View file

@ -1,5 +1,5 @@
#include "Memory.hpp"
#include "Test.hpp"
#include "storm/Memory.hpp"
#include "test/Test.hpp"
TEST_CASE("SMemAlloc", "[memory]") {
SECTION("allocates memory") {

View file

@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "Test.hpp"
#include "test/Test.hpp"

View file

@ -1 +1 @@
#include "catch.hpp"
#include "test/catch.hpp"