[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:
Timo Kreuzer 2024-12-01 14:29:04 +02:00
parent 7a15da2a8c
commit 8a63d7e898
2 changed files with 10 additions and 0 deletions

View file

@ -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")