mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
use bootstrap exec only for static builds
This commit is contained in:
parent
f58dfdb67d
commit
de4fa6439a
1 changed files with 10 additions and 2 deletions
|
@ -194,8 +194,13 @@ function(add_stubs_library stub)
|
||||||
set(stubouts ${stubouts} ${stubout} PARENT_SCOPE)
|
set(stubouts ${stubouts} ${stubout} PARENT_SCOPE)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${stubdir})
|
file(MAKE_DIRECTORY ${stubdir})
|
||||||
|
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${stubout}
|
add_custom_command(OUTPUT ${stubout}
|
||||||
COMMAND chibi-scheme-bootstrap ${chibi-ffi} ${stubfile} ${stubout}
|
# This makes sure we only use the separate bootstrap executable for static
|
||||||
|
# builds. With dynamic linking, the default executable is fine.
|
||||||
|
COMMAND $<IF:$<BOOL:${BUILD_SHARED_LIBS}>,chibi-scheme,chibi-scheme-bootstrap>
|
||||||
|
${chibi-ffi} ${stubfile} ${stubout}
|
||||||
DEPENDS ${stubfile} ${chibi-ffi}
|
DEPENDS ${stubfile} ${chibi-ffi}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
@ -222,7 +227,10 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_target(chibi-scheme-stubs DEPENDS ${stubouts})
|
add_custom_target(chibi-scheme-stubs DEPENDS ${stubouts})
|
||||||
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
|
||||||
|
if (NOT BUILD_SHARED_LIBS)
|
||||||
|
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_compiled_library(lib/chibi/weak.c)
|
add_compiled_library(lib/chibi/weak.c)
|
||||||
add_compiled_library(lib/chibi/heap-stats.c)
|
add_compiled_library(lib/chibi/heap-stats.c)
|
||||||
|
|
Loading…
Add table
Reference in a new issue