@@ -10,6 +10,13 @@ add_definitions("-DBUILDING_IOVMALL_DLL")
1010# Output our static library to the top-level _build hierarchy
1111set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR} /_build/lib)
1212
13+ # Define the subdirectories we can reach from here that we want
14+ # to go into and build stuff.
15+ add_subdirectory (coroutine )
16+ add_subdirectory (basekit )
17+ add_subdirectory (garbagecollector )
18+ add_subdirectory (iovm )
19+
1320# Our Io source files to be "compiled" into a C source file.
1421#file(GLOB IO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/iovm/io/*.io")
1522set (IO_SRCS
@@ -55,7 +62,8 @@ file(GLOB COROUTINE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/coroutine/source/*.c")
5562file (GLOB BASEKIT_SRCS "${CMAKE_CURRENT_SOURCE_DIR} /basekit/source/*.c" )
5663file (GLOB GARBAGECOLLECTOR_SRCS "${CMAKE_CURRENT_SOURCE_DIR} /garbagecollector/source/*.c" )
5764file (GLOB IOVM_SRCS "${CMAKE_CURRENT_SOURCE_DIR} /iovm/source/*.c" )
58- list (APPEND IOVM_SRCS ${CMAKE_CURRENT_SOURCE_DIR} /../deps/parson/parson.c)
65+
66+ list (APPEND IOVM_SRCS ${CMAKE_CURRENT_SOURCE_DIR} /../deps/parson/parson.c ${CMAKE_CURRENT_SOURCE_DIR} /iovm/source/IoVMInit.c)
5967
6068# Marvelous flags, likely compiler dependent.
6169#add_definitions(-DBUILDING_IOVM_DLL)# -DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
@@ -68,14 +76,6 @@ set(IOVMALL_STATIC_SRCS
6876 ${IOVM_SRCS}
6977)
7078
71- # The custom command to generate source/IoVMInit.c which is our
72- # "compiled" Io to C source code.
73- add_custom_command (
74- OUTPUT ${CMAKE_CURRENT_SOURCE_DIR} /iovm/source/IoVMInit.c
75- COMMAND ${PROJECT_BINARY_DIR} /_build/binaries/io2c VMCode IoState_doString_ ${IO_SRCS} > ${CMAKE_CURRENT_SOURCE_DIR} /iovm/source/IoVMInit.c
76- DEPENDS io2c
77- )
78-
7979# Include dirs, -I flags and whatnot
8080include_directories (
8181 ${CMAKE_CURRENT_SOURCE_DIR} /iovm/source
@@ -86,17 +86,7 @@ include_directories(
8686 ${CMAKE_CURRENT_SOURCE_DIR} /garbagecollector/source
8787)
8888
89- # Add a file to our library sources.
90- list (APPEND IOVMALL_STATIC_SRCS ${CMAKE_CURRENT_SOURCE_DIR} /iovm/source/IoVMInit.c) # Because we generate it
91-
9289# ...And the static library. Refer to IOVMALL_STATIC_SRCS definition
9390# up top.
9491add_library (iovmall_static STATIC ${IOVMALL_STATIC_SRCS} )
9592add_dependencies (iovmall_static io2c basekit coroutine garbagecollector iovmall )
96-
97- # Define the subdirectories we can reach from here that we want
98- # to go into and build stuff.
99- add_subdirectory (coroutine )
100- add_subdirectory (basekit )
101- add_subdirectory (garbagecollector )
102- add_subdirectory (iovm )
0 commit comments