Language Initial
This commit is contained in:
parent
73897f11df
commit
b8f2380c60
47 changed files with 831 additions and 14 deletions
15
Automatas/CMakeLists.txt
Normal file
15
Automatas/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
project(Automatas)
|
||||
|
||||
### ---------------------- Static Library --------------------- ###
|
||||
file(GLOB SOURCES "./private/*.cpp" "./private/*/*.cpp")
|
||||
file(GLOB HEADERS "./public/*.hpp" "./public/*/*.hpp")
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC public/)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Utils)
|
||||
|
||||
### -------------------------- Tests -------------------------- ###
|
||||
enable_testing()
|
||||
file(GLOB TEST_SOURCES "./tests/*.cpp")
|
||||
add_executable(${PROJECT_NAME}Tests ${TEST_SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME}Tests ${PROJECT_NAME} Utils)
|
||||
add_test(NAME ${PROJECT_NAME}Tests COMMAND ${PROJECT_NAME}Tests)
|
||||
8
Automatas/private/AutomatasCommon.cpp
Normal file
8
Automatas/private/AutomatasCommon.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
#include "AutomatasCommon.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
using namespace tp;
|
||||
|
||||
static ModuleManifest* sModuleDependencies[] = { &gModuleUtils, nullptr };
|
||||
ModuleManifest tp::gModuleAutomatas = ModuleManifest("Automatas", nullptr, nullptr, sModuleDependencies);
|
||||
7
Automatas/public/AutomatasCommon.hpp
Normal file
7
Automatas/public/AutomatasCommon.hpp
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Module.hpp"
|
||||
|
||||
namespace tp {
|
||||
extern ModuleManifest gModuleAutomatas;
|
||||
}
|
||||
14
Automatas/tests/Tests.cpp
Normal file
14
Automatas/tests/Tests.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "AutomatasCommon.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
int main() {
|
||||
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleAutomatas, &tp::gModuleUtils, nullptr };
|
||||
tp::ModuleManifest testModule("Test", nullptr, nullptr, deps);
|
||||
|
||||
if (!testModule.initialize()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
testModule.deinitialize();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue