From 5f468cd6eded930fbc7b97f90c106825750354b5 Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 6 Jun 2024 10:40:04 -0700 Subject: [PATCH] Set macro build make program For reasons, one may need to be able to set the make program on the macro build. Either they are unable to have `Ninja` on their path, or need to use a different `Ninja` for their macro build. --- Sources/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index 578548a2d..198d473e0 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -8,9 +8,15 @@ # Macros must be built for the build machine, not the host. include(ExternalProject) +if(NOT SwiftTesting_MACRO_MAKE_PROGRAM) + set(SwiftTesting_MACRO_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM}) +endif() + ExternalProject_Add(TestingMacros PREFIX "tm" SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/TestingMacros" + CMAKE_ARGS + -DCMAKE_MAKE_PROGRAM=${SwiftTesting_MACRO_MAKE_PROGRAM} INSTALL_COMMAND "") ExternalProject_Get_Property(TestingMacros BINARY_DIR) if(CMAKE_HOST_WIN32)