Skip to content

Commit fdf8601

Browse files
committed
Merge branch 'feature/custom-main-functions'
2 parents 8451434 + 36eaf0a commit fdf8601

104 files changed

Lines changed: 57 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
path = Extern/imgui
66
url = https://github.com/ocornut/imgui.git
77
[submodule "Libs/Pipe"]
8-
path = Libs/Pipe
8+
path = Extern/Pipe
99
url = https://github.com/PipeRift/pipe.git
1010
[submodule "Extern/glfw"]
1111
path = Extern/glfw

Apps/CLI/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target_sources(RiftCLIExe PRIVATE ${CLI_SOURCE_FILES})
88

99
target_link_libraries(RiftCLIExe PUBLIC
1010
CLI11
11-
Rift
11+
RiftAST
1212
RiftCompilerModules
1313
)
1414

Apps/CLI/Src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// Override as first include
55

66
#include <AST/Utils/ModuleUtils.h>
7+
#include <ASTModule.h>
78
#include <Compiler/Compiler.h>
89
#include <Compiler/Utils/BackendUtils.h>
9-
#include <FrameworkModule.h>
1010
#include <GraphViewModule.h>
1111
#include <LLVMBackendModule.h>
1212
#include <MIRBackendModule.h>
@@ -19,6 +19,7 @@
1919
#include <CLI/CLI.hpp>
2020

2121

22+
2223
using namespace rift;
2324

2425

@@ -65,7 +66,7 @@ namespace rift
6566
int main(int argc, char** argv)
6667
{
6768
p::Initialize("Saved/Logs");
68-
EnableModule<FrameworkModule>();
69+
EnableModule<ASTModule>();
6970
EnableModule<LLVMBackendModule>();
7071
EnableModule<MIRBackendModule>();
7172
EnableModule<GraphViewModule>();

Apps/Editor/Src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <Pipe/Memory/NewDelete.h>
44
// Override as first include
55

6+
#include <ASTModule.h>
67
#include <Editor.h>
7-
#include <FrameworkModule.h>
88
#include <GraphViewModule.h>
99
#include <LLVMBackendModule.h>
1010
#include <MIRBackendModule.h>
@@ -13,6 +13,7 @@
1313
#include <iostream>
1414

1515

16+
1617
using namespace rift;
1718

1819

@@ -23,7 +24,7 @@ using namespace rift;
2324
int RunEditor(StringView projectPath)
2425
{
2526
p::Initialize("Saved/Logs");
26-
EnableModule<FrameworkModule>();
27+
EnableModule<ASTModule>();
2728
EnableModule<LLVMBackendModule>();
2829
EnableModule<MIRBackendModule>();
2930
EnableModule<GraphViewModule>();

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ option(RIFT_BUILD_TESTS "Build Rift and Core tests" ${RIFT_IS_PROJECT})
3131

3232
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
3333
include(CMake/DownloadProject.cmake)
34-
include(Libs/Pipe/CMake/Util.cmake)
34+
include(Extern/Pipe/CMake/Util.cmake)
3535
include(CMake/Util.cmake)
3636
include(CMake/SetIcon.cmake)
3737
include(CMake/CheckClangTools.cmake)
@@ -56,7 +56,7 @@ if(CLANG_FORMAT_EXE)
5656
# Additional targets to perform clang-format/clang-tidy
5757
file(GLOB_RECURSE ALL_SOURCE_FILES CONFIGURE_DEPENDS
5858
Apps/**/*.cpp Apps/**/*.h
59-
Libs/Framework/**/*.cpp Libs/Framework/**/*.h
59+
Libs/AST/**/*.cpp Libs/AST/**/*.h
6060
Libs/UI/**/*.cpp Libs/UI/**/*.h
6161
Libs/Pipe/Include/**/*.cpp Libs/Pipe/Include/**/*.h
6262
Libs/Pipe/Src/**/*.cpp Libs/Pipe/Src/**/*.h
@@ -71,7 +71,7 @@ endif()
7171
if(CLANG_TIDY_EXE)
7272
file(GLOB_RECURSE ALL_SOURCE_FILES CONFIGURE_DEPENDS
7373
Apps/**/*.cpp
74-
Libs/Framework/**/*.cpp
74+
Libs/AST/**/*.cpp
7575
Libs/UI/**/*.cpp
7676
Libs/Pipe/Include/**/*.cpp
7777
Libs/Pipe/Src/**/*.cpp

Extern/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ include(FetchContent)
44
set(BUILD_SHARED_LIBS OFF)
55

66
# Submodule libraries
7+
8+
set(PIPE_BUILD_TESTS ${RIFT_BUILD_TESTS} CACHE BOOL "Build Pipe tests")
9+
add_subdirectory(Pipe)
10+
11+
712
set(CLI11_BUILD_TESTS OFF CACHE BOOL "Build CLI11 tests")
813
set(CMAKE_POLICY_DEFAULT_CMP0054 NEW)
914
add_subdirectory(CLI11)

Libs/AST/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2015-2023 Piperift - All rights reserved
2+
3+
add_library(RiftAST STATIC)
4+
target_include_directories(RiftAST PUBLIC Include)
5+
6+
file(GLOB_RECURSE AST_SOURCE_FILES CONFIGURE_DEPENDS Src/*.cpp Src/*.h)
7+
target_sources(RiftAST PRIVATE ${AST_SOURCE_FILES})
8+
9+
target_link_libraries(RiftAST PUBLIC
10+
Pipe
11+
Taskflow
12+
RiftBindingNative
13+
)
14+
15+
rift_module(RiftAST)
16+
set_target_properties (RiftAST PROPERTIES FOLDER Rift)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)