mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Meta: Update jakt build support for fully bootstrapped compiler
Remove the Corrosion dependency, and use the now-builtin add_jakt_executable function from the Jakt install rules to build our example application. By using find_package(Jakt), we now have to set ENABLE_JAKT manually on both serenity and Lagom at the same time, so the preferred method to do this for now is: cmake -B Build/superbuild<arch><toolchain> \ -S Meta/CMake/Superbuild \ -DENABLE_JAKT=ON \ -DJAKT_SOURCE_DIR=/path/to/jakt Where omitting JAKT_SOURCE_DIR will still pull from the main branch of SerenityOS/jakt. This can be done after runing Meta/serenity.sh run.
This commit is contained in:
parent
72ae082ca8
commit
5ab3fcf710
8 changed files with 14 additions and 81 deletions
|
@ -62,25 +62,3 @@ function(generate_state_machine source header)
|
|||
add_dependencies(all_generated ${target_name})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(compile_jakt source)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source})
|
||||
get_filename_component(source_base ${source} NAME_WE)
|
||||
set(output "${source_base}.cpp")
|
||||
add_custom_command(
|
||||
OUTPUT ${output}
|
||||
COMMAND $<TARGET_FILE:Lagom::jakt> -S -o "${CMAKE_CURRENT_BINARY_DIR}/jakt_tmp" ${source}
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_BINARY_DIR}/jakt_tmp/${output}" ${output}
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_CURRENT_BINARY_DIR}/jakt_tmp/${output}"
|
||||
VERBATIM
|
||||
DEPENDS Lagom::jakt
|
||||
MAIN_DEPENDENCY ${source}
|
||||
)
|
||||
get_property(JAKT_INCLUDE_DIR TARGET Lagom::jakt PROPERTY IMPORTED_INCLUDE_DIRECTORIES)
|
||||
set_source_files_properties("${output}" PROPERTIES
|
||||
INCLUDE_DIRECTORIES "${JAKT_INCLUDE_DIR}/runtime"
|
||||
COMPILE_OPTIONS "-Wno-unused-local-typedefs;-Wno-unused-function")
|
||||
get_filename_component(output_name ${output} NAME)
|
||||
add_custom_target(generate_${output_name} DEPENDS ${output})
|
||||
add_dependencies(all_generated generate_${output_name})
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue