]> git.lizzy.rs Git - nothing.git/blobdiff - CMakeLists.txt
TODO(#330)
[nothing.git] / CMakeLists.txt
index 21154a526569cad3e21cba12c2435d659d5c618c..51e8054b640f932ecf12438df2b16cbe1dbb6d7b 100644 (file)
@@ -43,6 +43,12 @@ 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
@@ -78,6 +84,14 @@ 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
@@ -86,7 +100,61 @@ set(HEADER_FILES
 )
 
 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,7 +181,7 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" ST
      -Wstrict-prototypes \
      -Wwrite-strings \
      -Wswitch \
-     -Wbool-compare \
+     -Wmissing-field-initializers \
      -fno-common \
      -pedantic \
      -std=c11 \
@@ -126,3 +194,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})