Compare commits
3 Commits
feature-AS
...
e6420cb1c9
| Author | SHA1 | Date | |
|---|---|---|---|
| e6420cb1c9 | |||
| f50546bd07 | |||
| c99f307827 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@ out/Release/
|
||||
|
||||
# Cmake files
|
||||
CMakeCache.txt
|
||||
cmake
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
CTestTestfile.cmake
|
||||
|
||||
@@ -3,16 +3,8 @@ project(calculator VERSION 1.0 LANGUAGES C)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
arena
|
||||
GIT_REPOSITORY https://laentropia-homelab.tail7368da.ts.net/laentropia/Arena.git
|
||||
GIT_TAG main
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/arena
|
||||
)
|
||||
|
||||
# Export compile_commands.json (para clangd)
|
||||
# clangd
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
add_compile_options(
|
||||
@@ -21,15 +13,18 @@ add_compile_options(
|
||||
-Wpedantic
|
||||
)
|
||||
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
FetchContent_MakeAvailable(arena)
|
||||
|
||||
add_library(arena STATIC
|
||||
external/arena/src/arena.c
|
||||
CPMAddPackage(
|
||||
NAME arena
|
||||
GIT_REPOSITORY https://laentropia-homelab.tail7368da.ts.net/laentropia/Arena.git
|
||||
GIT_TAG main
|
||||
)
|
||||
|
||||
target_include_directories(arena
|
||||
PUBLIC ${CMAKE_SOURCE_DIR}/external/arena/include
|
||||
CPMAddPackage(
|
||||
NAME arraylist
|
||||
GIT_REPOSITORY https://laentropia-homelab.tail7368da.ts.net/laentropia/ArrayList.git
|
||||
GIT_TAG main
|
||||
)
|
||||
|
||||
add_library(calculator_lib
|
||||
@@ -43,18 +38,13 @@ target_include_directories(calculator_lib
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
# 🔥 aquí está la magia
|
||||
target_link_libraries(calculator_lib
|
||||
PUBLIC arena
|
||||
)
|
||||
|
||||
add_executable(calculator src/main.c)
|
||||
|
||||
target_link_libraries(calculator calculator_lib)
|
||||
|
||||
# ------------------------
|
||||
# Testing
|
||||
# ------------------------
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
|
||||
|
||||
1
external/arena
vendored
1
external/arena
vendored
Submodule external/arena deleted from 3d3b8596cc
@@ -4,8 +4,6 @@
|
||||
#include <stdalign.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
uint8_t node_lbp(ASTNode node) {
|
||||
if (node.type == NODE_INTEGER) {
|
||||
|
||||
Reference in New Issue
Block a user