mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[CMAKE] Build host-tools as release by default
This setting can be overwritten by defining the CMake variable HOST_BUILD_TYPE. The target build type is passed to the host build as TARGET_BUILD_TYPE CMake variable. This improves time to build cab+iso: MSVC x86: 37s -> 28s GCC x86: 32s -> 16s
This commit is contained in:
parent
7a15da2a8c
commit
8a63d7e898
2 changed files with 10 additions and 0 deletions
|
@ -91,6 +91,10 @@ function(setup_host_tools)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED HOST_BUILD_TYPE)
|
||||
set(HOST_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(host-tools
|
||||
SOURCE_DIR ${REACTOS_SOURCE_DIR}
|
||||
PREFIX ${REACTOS_BINARY_DIR}/host-tools
|
||||
|
@ -102,6 +106,8 @@ function(setup_host_tools)
|
|||
-DCMAKE_INSTALL_PREFIX=${REACTOS_BINARY_DIR}/host-tools
|
||||
-DTOOLS_FOLDER=${REACTOS_BINARY_DIR}/host-tools/bin
|
||||
-DTARGET_COMPILER_ID=${CMAKE_C_COMPILER_ID}
|
||||
-DTARGET_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_BUILD_TYPE=${HOST_BUILD_TYPE}
|
||||
${CMAKE_HOST_TOOLS_EXTRA_ARGS}
|
||||
BUILD_ALWAYS TRUE
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E true
|
||||
|
|
|
@ -48,6 +48,10 @@ if ((ARCH STREQUAL "amd64") AND (TARGET_COMPILER_ID STREQUAL "GNU"))
|
|||
add_subdirectory(gcc_plugin_seh)
|
||||
endif()
|
||||
|
||||
if (TARGET_BUILD_TYPE)
|
||||
# Silence warning about unused variable
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
add_host_tool(pefixup pefixup.c)
|
||||
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
|
||||
|
|
Loading…
Reference in a new issue