]> git.lizzy.rs Git - nothing.git/blobdiff - CMakeLists.txt
TODO(#360)
[nothing.git] / CMakeLists.txt
index 13963e8da3a0836f727c95d084026b03b3156653..3f29c2e2ec40e6522c789bffd1a6526872a9d378 100644 (file)
@@ -43,11 +43,18 @@ set(SOURCE_FILES
   src/math/rand.c
   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/game/level/console.c
 )
 
 set(HEADER_FILES
@@ -78,15 +85,78 @@ 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/game/level/console.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
+  )
+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
+  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
@@ -113,6 +183,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 \
@@ -125,3 +196,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})