From f4b9f275a43df579ba2cd21595809f8499ca053a Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:58:49 -0700 Subject: [PATCH] Always optimize included tool submodules. --- tools/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2dd59f301..0a76259dc 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,13 @@ +option(MARATHON_RECOMP_OPTIMIZE_TOOLS "Apply compiler optimizations to build tools." ON) +if (MARATHON_RECOMP_OPTIMIZE_TOOLS) + if (WIN32) + add_compile_options(/O2) + else() + add_compile_options(-O3) + endif() + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) +endif() + add_subdirectory(${MARATHON_RECOMP_TOOLS_ROOT}/bc_diff) add_subdirectory(${MARATHON_RECOMP_TOOLS_ROOT}/file_to_c) add_subdirectory(${MARATHON_RECOMP_TOOLS_ROOT}/fshasher)