cleanup of source + build system

* seperated most parts into headers & source files
* seperated anthracite into libanthracite and anthracite-bin for modules
* built demo webAPI module
* rewrote some code to do things in the
* changed cmakelists to not build in src directory
This commit is contained in:
Nicholas Orlowsky 2025-02-04 02:03:27 -05:00
parent c4540a1397
commit 54d82b8c66
Signed by: nickorlow
GPG key ID: 838827D8C4611687
26 changed files with 607 additions and 378 deletions

View file

@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
project(anthracite)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
add_custom_target(build-supplemental
COMMAND cd ./build && ./version.sh && python3 ./error_gen.py
COMMAND cd ../build_supp && ./version.sh && python3 ./error_gen.py
COMMAND cp -r ../www .
)
add_custom_target(lint
@ -32,5 +34,15 @@ add_custom_target(run
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
)
add_executable(anthracite-bin main.cpp)
FILE(GLOB SOURCES **/*.cpp)
add_library(anthracite anthracite_main.cpp ${SOURCES})
add_executable(anthracite-bin file_main.cpp)
target_link_libraries(anthracite-bin anthracite)
add_executable(anthracite-api-bin api_main.cpp)
target_link_libraries(anthracite-api-bin anthracite)
add_dependencies(anthracite-bin build-supplemental)
add_dependencies(anthracite-bin anthracite)