From 118d20c49dafb88ec5b3a9cc850037b89a05a7fe Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 1 Nov 2020 17:45:45 -0600 Subject: [PATCH] chore(build): improve include paths --- storm/Array.hpp | 6 +++--- storm/CMakeLists.txt | 2 +- storm/List.hpp | 8 ++++---- storm/Memory.cpp | 2 +- storm/String.cpp | 4 ++-- storm/Thread.hpp | 8 ++++---- storm/array/TSFixedArray.hpp | 4 ++-- storm/array/TSGrowableArray.hpp | 2 +- storm/list/TSExplicitList.hpp | 4 ++-- storm/list/TSGetExplicitLink.hpp | 2 +- storm/list/TSGetLink.hpp | 4 ++-- storm/list/TSLinkedNode.hpp | 2 +- storm/list/TSList.hpp | 6 +++--- storm/thread/SCritSect.cpp | 2 +- storm/thread/SEvent.cpp | 2 +- storm/thread/SEvent.hpp | 2 +- storm/thread/SSyncObject.cpp | 2 +- storm/thread/SThread.cpp | 4 ++-- storm/thread/SThread.hpp | 2 +- storm/thread/S_Thread.cpp | 2 +- storm/thread/S_Thread.hpp | 2 +- storm/thread/mac/SThreadRunner.mm | 4 ++-- storm/thread/mac/S_Thread.mm | 4 ++-- storm/thread/mac/Thread.mm | 10 +++++----- test/Array.cpp | 4 ++-- test/CMakeLists.txt | 3 +-- test/List.cpp | 4 ++-- test/Memory.cpp | 4 ++-- test/Test.cpp | 2 +- test/Test.hpp | 2 +- 30 files changed, 54 insertions(+), 55 deletions(-) diff --git a/storm/Array.hpp b/storm/Array.hpp index 535de1e..6280627 100644 --- a/storm/Array.hpp +++ b/storm/Array.hpp @@ -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 diff --git a/storm/CMakeLists.txt b/storm/CMakeLists.txt index cd2371b..3c023f9 100644 --- a/storm/CMakeLists.txt +++ b/storm/CMakeLists.txt @@ -19,5 +19,5 @@ add_library(storm STATIC target_include_directories(storm PRIVATE - ${CMAKE_SOURCE_DIR}/storm + ${PROJECT_SOURCE_DIR} ) diff --git a/storm/List.hpp b/storm/List.hpp index 2145523..0eac8d9 100644 --- a/storm/List.hpp +++ b/storm/List.hpp @@ -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 diff --git a/storm/Memory.cpp b/storm/Memory.cpp index 59dcea0..bf04ef3 100644 --- a/storm/Memory.cpp +++ b/storm/Memory.cpp @@ -1,4 +1,4 @@ -#include "Memory.hpp" +#include "storm/Memory.hpp" constexpr size_t ALIGNMENT = 8; diff --git a/storm/String.cpp b/storm/String.cpp index 5124580..013c08e 100644 --- a/storm/String.cpp +++ b/storm/String.cpp @@ -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); diff --git a/storm/Thread.hpp b/storm/Thread.hpp index dfbc442..1c84d3e 100644 --- a/storm/Thread.hpp +++ b/storm/Thread.hpp @@ -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 int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName); diff --git a/storm/array/TSFixedArray.hpp b/storm/array/TSFixedArray.hpp index 47120c0..e29a22d 100644 --- a/storm/array/TSFixedArray.hpp +++ b/storm/array/TSFixedArray.hpp @@ -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 template diff --git a/storm/array/TSGrowableArray.hpp b/storm/array/TSGrowableArray.hpp index 196fbcb..cbae6e2 100644 --- a/storm/array/TSGrowableArray.hpp +++ b/storm/array/TSGrowableArray.hpp @@ -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 #include #include diff --git a/storm/list/TSExplicitList.hpp b/storm/list/TSExplicitList.hpp index 944a26b..ccd3e54 100644 --- a/storm/list/TSExplicitList.hpp +++ b/storm/list/TSExplicitList.hpp @@ -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 #define STORM_EXPLICIT_LIST(T, link) TSExplicitList diff --git a/storm/list/TSGetExplicitLink.hpp b/storm/list/TSGetExplicitLink.hpp index 64c364c..10321c2 100644 --- a/storm/list/TSGetExplicitLink.hpp +++ b/storm/list/TSGetExplicitLink.hpp @@ -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 #include diff --git a/storm/list/TSGetLink.hpp b/storm/list/TSGetLink.hpp index f808383..5c70060 100644 --- a/storm/list/TSGetLink.hpp +++ b/storm/list/TSGetLink.hpp @@ -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 #include diff --git a/storm/list/TSLinkedNode.hpp b/storm/list/TSLinkedNode.hpp index 270f468..85dc776 100644 --- a/storm/list/TSLinkedNode.hpp +++ b/storm/list/TSLinkedNode.hpp @@ -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 TSLinkedNode { diff --git a/storm/list/TSList.hpp b/storm/list/TSList.hpp index 3ee9084..6ca7482 100644 --- a/storm/list/TSList.hpp +++ b/storm/list/TSList.hpp @@ -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 #include diff --git a/storm/thread/SCritSect.cpp b/storm/thread/SCritSect.cpp index 2b53660..ab46138 100644 --- a/storm/thread/SCritSect.cpp +++ b/storm/thread/SCritSect.cpp @@ -1,4 +1,4 @@ -#include "thread/SCritSect.hpp" +#include "storm/thread/SCritSect.hpp" void SCritSect::Enter() { #if defined(PLATFORM_WIN) diff --git a/storm/thread/SEvent.cpp b/storm/thread/SEvent.cpp index df8057b..5529a01 100644 --- a/storm/thread/SEvent.cpp +++ b/storm/thread/SEvent.cpp @@ -1,4 +1,4 @@ -#include "thread/SEvent.hpp" +#include "storm/thread/SEvent.hpp" SEvent::SEvent(int32_t manualReset, int32_t initialValue) : SSyncObject() { diff --git a/storm/thread/SEvent.hpp b/storm/thread/SEvent.hpp index 9f08de8..3c258ee 100644 --- a/storm/thread/SEvent.hpp +++ b/storm/thread/SEvent.hpp @@ -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 class SEvent : public SSyncObject { diff --git a/storm/thread/SSyncObject.cpp b/storm/thread/SSyncObject.cpp index 8cb0a48..dbb10af 100644 --- a/storm/thread/SSyncObject.cpp +++ b/storm/thread/SSyncObject.cpp @@ -1,4 +1,4 @@ -#include "thread/SSyncObject.hpp" +#include "storm/thread/SSyncObject.hpp" #if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX) #include diff --git a/storm/thread/SThread.cpp b/storm/thread/SThread.cpp index f43938a..e36480e 100644 --- a/storm/thread/SThread.cpp +++ b/storm/thread/SThread.cpp @@ -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) diff --git a/storm/thread/SThread.hpp b/storm/thread/SThread.hpp index e3a18f1..39809e4 100644 --- a/storm/thread/SThread.hpp +++ b/storm/thread/SThread.hpp @@ -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 class SThread : public SSyncObject { diff --git a/storm/thread/S_Thread.cpp b/storm/thread/S_Thread.cpp index c9e9113..a4d204c 100644 --- a/storm/thread/S_Thread.cpp +++ b/storm/thread/S_Thread.cpp @@ -1,4 +1,4 @@ -#include "thread/S_Thread.hpp" +#include "storm/thread/S_Thread.hpp" int32_t S_Thread::s_numthreads; diff --git a/storm/thread/S_Thread.hpp b/storm/thread/S_Thread.hpp index 19a8de6..2cf2907 100644 --- a/storm/thread/S_Thread.hpp +++ b/storm/thread/S_Thread.hpp @@ -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 typedef SThread SyncObjectData; diff --git a/storm/thread/mac/SThreadRunner.mm b/storm/thread/mac/SThreadRunner.mm index e112d52..64d8d43 100644 --- a/storm/thread/mac/SThreadRunner.mm +++ b/storm/thread/mac/SThreadRunner.mm @@ -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 diff --git a/storm/thread/mac/S_Thread.mm b/storm/thread/mac/S_Thread.mm index 99b2366..2550959 100644 --- a/storm/thread/mac/S_Thread.mm +++ b/storm/thread/mac/S_Thread.mm @@ -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 diff --git a/storm/thread/mac/Thread.mm b/storm/thread/mac/Thread.mm index ea51791..f2393ad 100644 --- a/storm/thread/mac/Thread.mm +++ b/storm/thread/mac/Thread.mm @@ -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 int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3, SThread* syncObject, const char* threadName) { diff --git a/test/Array.cpp b/test/Array.cpp index 9d3e8f4..fa2e1e2 100644 --- a/test/Array.cpp +++ b/test/Array.cpp @@ -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") { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0d1097e..4b7949b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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") diff --git a/test/List.cpp b/test/List.cpp index b2a5f7a..1742430 100644 --- a/test/List.cpp +++ b/test/List.cpp @@ -1,5 +1,5 @@ -#include "List.hpp" -#include "Test.hpp" +#include "storm/List.hpp" +#include "test/Test.hpp" struct TestListNode : TSLinkedNode { uint32_t index = 0; diff --git a/test/Memory.cpp b/test/Memory.cpp index 3b9f3d8..b30b865 100644 --- a/test/Memory.cpp +++ b/test/Memory.cpp @@ -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") { diff --git a/test/Test.cpp b/test/Test.cpp index e326661..14d382f 100644 --- a/test/Test.cpp +++ b/test/Test.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "Test.hpp" +#include "test/Test.hpp" diff --git a/test/Test.hpp b/test/Test.hpp index fc502ef..0ffd7fe 100644 --- a/test/Test.hpp +++ b/test/Test.hpp @@ -1 +1 @@ -#include "catch.hpp" +#include "test/catch.hpp"