X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=CMakeLists.txt;h=80163e0faab0b4050121acbfa6858376f136be43;hb=bd6c2a65643cf991c9e440e0e5b0b54fb91ff515;hp=a747dbaf128f5d23e7d93cd84995eb8a12e95298;hpb=7a4db16e7da7525e07c7f57eb455810219b66686;p=nothing.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a747dbaf..80163e0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,7 @@ set(SOURCE_FILES src/color.c src/game.c src/game/camera.c - src/game/debug_tree.c - src/game/edit_field.c + src/ui/edit_field.c src/game/level.c src/game/level/background.c src/game/level/boxes.c @@ -44,20 +43,28 @@ set(SOURCE_FILES src/math/rect.c src/math/triangle.c src/script/expr.c + src/script/interpreter.c + src/script/parser.c + src/script/tokenizer.c + src/script/gc.c + src/script/scope.c src/sdl/renderer.c src/system/error.c src/system/lt.c src/system/lt/lt_adapters.c src/system/lt/lt_slot.c + src/ui/console.c + src/ui/log.c + src/str.c + src/ui/history.c + src/game/level/region.c ) set(HEADER_FILES src/color.h src/game.h src/game/camera.h - src/game/debug_node.h - src/game/debug_tree.h - src/game/edit_field.h + src/ui/edit_field.h src/game/level.h src/game/level/background.h src/game/level/boxes.h @@ -79,16 +86,86 @@ set(HEADER_FILES src/math/rand.h src/math/rect.h src/math/triangle.h + src/script/builtins.c + src/script/builtins.h src/script/expr.h + src/script/gc.h + src/script/scope.h + src/script/interpreter.h + src/script/parser.h + src/script/tokenizer.h src/sdl/renderer.h src/system/error.h src/system/lt.h src/system/lt/lt_adapters.h src/system/lt/lt_slot.h + src/ui/console.h + src/ui/log.h + src/str.h + src/ui/history.h + src/game/level/region.h ) add_executable(nothing ${SOURCE_FILES} ${HEADER_FILES}) +add_executable(repl + src/script/builtins.c + src/script/builtins.h + src/script/expr.c + src/script/expr.h + src/script/interpreter.c + src/script/interpreter.h + src/script/parser.c + src/script/parser.h + src/script/scope.c + src/script/scope.h + src/script/tokenizer.c + src/script/tokenizer.h + src/script/repl.c + src/system/lt.c + src/system/lt.h + src/system/lt/lt_adapters.c + src/system/lt/lt_adapters.h + src/system/lt/lt_slot.c + src/system/lt/lt_slot.h + src/system/error.c + src/system/error.h + src/script/gc.h + src/script/gc.c + src/str.h + src/str.c + ) +add_executable(nothing_test + src/script/builtins.c + src/script/builtins.h + src/script/expr.c + src/script/expr.h + src/script/interpreter.c + src/script/interpreter.h + src/script/parser.c + src/script/parser.h + src/script/scope.c + src/script/scope.h + src/script/tokenizer.c + src/script/tokenizer.h + src/script/gc.h + src/script/gc.c + src/system/error.c + src/system/error.h + src/system/lt.c + src/system/lt.h + src/system/lt/lt_adapters.c + src/system/lt/lt_adapters.h + src/system/lt/lt_slot.c + src/system/lt/lt_slot.h + src/str.h + src/str.c + test/main.c + test/test.h + test/tokenizer_suite.h + ) target_link_libraries(nothing ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY}) +target_link_libraries(nothing_test ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY}) +target_link_libraries(repl ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY}) if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG")) set(CMAKE_C_FLAGS @@ -115,6 +192,7 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" ST -Wstrict-prototypes \ -Wwrite-strings \ -Wswitch \ + -Wmissing-field-initializers \ -fno-common \ -pedantic \ -std=c11 \ @@ -127,3 +205,4 @@ endif() file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sounds DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/fonts DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test-data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})