broken code, but added attempt at writing grammar

This commit is contained in:
Ellen Arvidsson 2025-04-14 17:40:22 +02:00
parent fb95e5d026
commit 20e3757f44
18 changed files with 1145 additions and 142 deletions

View file

@ -4,27 +4,55 @@ project(log-e-sappho C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
include(CheckSymbolExists)
set(INCLUDE_DIR include)
set(SRC_DIR src)
set(SPHO_HEADER_DIR ${INCLUDE_DIR}/spho)
set(SPHO_HEADER
${SPHO_HEADER_DIR}/ctx.h
${SPHO_HEADER_DIR}/data.h
${SPHO_HEADER_DIR}/err.h
${SPHO_HEADER_DIR}/loc.h
${SPHO_HEADER_DIR}/parse.h
${SPHO_HEADER_DIR}/spho.h
${SPHO_HEADER_DIR}/scope.h
${SPHO_HEADER_DIR}/tp.h
${SPHO_HEADER_DIR}/spho.h
)
set(SPHO_SRC
${SRC_DIR}/spho/ctx.c
${SRC_DIR}/spho/scope.c
${SRC_DIR}/spho/tp.c
)
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
add_library(spho STATIC ${SPHO_HEADER} ${SPHO_SRC})
target_include_directories(spho PRIVATE ${INCLUDE_DIR})
target_compile_definitions(spho PRIVATE
$<$<CONFIG:Debug>:SPHO_DEBUG>
$<$<BOOL:${HAVE_STRLCPY}>:SPHO_USE_STRLCPY>
)
add_executable(devcheck ${SRC_DIR}/run/devcheck.c)
target_link_libraries(devcheck spho)
target_include_directories(devcheck PRIVATE ${INCLUDE_DIR})
target_compile_definitions(devcheck PRIVATE
$<$<CONFIG:Debug>:SPHO_DEBUG>
)
set(MSPH_SRC
${SRC_DIR}/msph/msph_token.c
${SRC_DIR}/msph/msph.c
)
set(MSPH_HEADER
${SRC_DIR}/msph/msph_token.h
)
add_executable(msph ${MSPH_HEADER} ${MSPH_SRC})
target_include_directories(spho PRIVATE ${INCLUDE_DIR})