Improve Build Time
This commit is contained in:
parent
98c4ee306d
commit
63e2525ee9
2
archives
2
archives
@ -1 +1 @@
|
||||
Subproject commit 0d7025eb709351d2db51d19a46ff8e2640bd4465
|
||||
Subproject commit 2f5953779674ec3a14114aa34b24c81005571ec4
|
@ -1,5 +1,5 @@
|
||||
# Pick Archive
|
||||
set(toolchain_version "13.2.rel1")
|
||||
set(toolchain_version "13.3.rel1")
|
||||
execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(arch STREQUAL "x86_64")
|
||||
set(toolchain_file "arm-gnu-toolchain-${toolchain_version}-x86_64-arm-none-linux-gnueabihf.tar.xz")
|
||||
|
2
dependencies/runtime/CMakeLists.txt
vendored
2
dependencies/runtime/CMakeLists.txt
vendored
@ -3,7 +3,7 @@ project(runtime)
|
||||
## Extra Runtime
|
||||
|
||||
# QEMU
|
||||
set(QEMU_VERSION "9.0.0")
|
||||
set(QEMU_VERSION "9.0.2")
|
||||
set(RUNTIME_QEMU_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/../../archives/qemu-${QEMU_VERSION}.tar.xz")
|
||||
if(NOT BUILD_NATIVE_COMPONENTS)
|
||||
set(TRAMPOLINE_HEADERS_ONLY TRUE)
|
||||
|
2
dependencies/symbol-processor/src
vendored
2
dependencies/symbol-processor/src
vendored
@ -1 +1 @@
|
||||
Subproject commit 10026e9a0419ff1cea1ddb80f5ccddf6a53818d3
|
||||
Subproject commit 2a63f1ff521087f3faf23bf281503cc07a50d2df
|
@ -188,11 +188,6 @@ set(SRC
|
||||
src/recipes/ReqItem.def
|
||||
src/recipes/CItem.def
|
||||
)
|
||||
# Resolve Definition Files
|
||||
set(RESOLVED_SRC "")
|
||||
foreach(FILE IN LISTS SRC)
|
||||
list(APPEND RESOLVED_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
|
||||
endforeach()
|
||||
|
||||
# Directories
|
||||
function(set_and_mkdir name dir)
|
||||
@ -204,21 +199,38 @@ set_and_mkdir(INCLUDE_OUTPUT_DIR "${GENERATED_DIR}/include")
|
||||
set_and_mkdir(HEADER_OUTPUT_DIR "${INCLUDE_OUTPUT_DIR}/symbols")
|
||||
set_and_mkdir(SRC_OUTPUT_DIR "${GENERATED_DIR}/src")
|
||||
|
||||
# Files
|
||||
# Generated Header File
|
||||
set(HEADER_OUTPUT_FILE "${HEADER_OUTPUT_DIR}/minecraft.h")
|
||||
set(SRC_OUTPUT_FILE "${SRC_OUTPUT_DIR}/minecraft.cpp")
|
||||
|
||||
# Generated Source Files
|
||||
set(SRC_OUTPUT_FILES "")
|
||||
foreach(FILE IN LISTS SRC)
|
||||
get_filename_component(FILE_EXT "${FILE}" EXT)
|
||||
if(FILE_EXT STREQUAL ".def")
|
||||
get_filename_component(FILE "${FILE}" NAME_WE)
|
||||
list(APPEND SRC_OUTPUT_FILES "${SRC_OUTPUT_DIR}/${FILE}.cpp")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Generate
|
||||
set(INPUT_FILES "")
|
||||
foreach(FILE IN LISTS SRC)
|
||||
list(APPEND INPUT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
|
||||
endforeach()
|
||||
set(OUTPUT_FILES ${SRC_OUTPUT_FILES} "${HEADER_OUTPUT_FILE}")
|
||||
add_custom_command(
|
||||
OUTPUT "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}"
|
||||
DEPENDS ${RESOLVED_SRC}
|
||||
COMMAND npm start --silent -- "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}" ${RESOLVED_SRC}
|
||||
OUTPUT ${OUTPUT_FILES}
|
||||
DEPENDS ${INPUT_FILES}
|
||||
COMMAND npm start --silent -- "${SRC_OUTPUT_DIR}" "${HEADER_OUTPUT_FILE}" ${INPUT_FILES}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/symbol-processor/src"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Build
|
||||
add_library(symbols SHARED "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}")
|
||||
add_library(symbols SHARED ${OUTPUT_FILES})
|
||||
|
||||
# Speed Up Compilation
|
||||
#target_precompile_headers(symbols PRIVATE "${HEADER_OUTPUT_FILE}")
|
||||
|
||||
# Show In IDE
|
||||
add_custom_target(symbols-src
|
||||
|
Loading…
Reference in New Issue
Block a user