target_link_libraries(smashtest PRIVATE gc)
add_test(NAME smashtest COMMAND smashtest)
+ if (NOT (BUILD_SHARED_LIBS AND WIN32))
+ add_library(staticrootslib_test tests/staticrootslib.c)
+ target_link_libraries(staticrootslib_test PRIVATE gc)
+ add_library(staticrootslib2_test tests/staticrootslib.c)
+ target_compile_options(staticrootslib2_test PRIVATE "-DSTATICROOTSLIB2")
+ target_link_libraries(staticrootslib2_test PRIVATE gc)
+ add_executable(staticrootstest tests/staticrootstest.c)
+ target_compile_options(staticrootstest PRIVATE "-DSTATICROOTSLIB2")
+ target_link_libraries(staticrootstest PRIVATE
+ gc staticrootslib_test staticrootslib2_test)
+ add_test(NAME staticrootstest COMMAND staticrootstest)
+ endif()
+
if (enable_gc_debug)
add_executable(tracetest tests/trace_test.c)
target_link_libraries(tracetest PRIVATE gc)