From 4d6a4d035c3c3b87827f69d81c93f6d925694091 Mon Sep 17 00:00:00 2001 From: Alexander Widerberg Date: Thu, 18 Jul 2024 20:22:16 +0200 Subject: [PATCH 1/2] Fixes #146 --- ios.toolchain.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios.toolchain.cmake b/ios.toolchain.cmake index db2a327..0f6dd46 100644 --- a/ios.toolchain.cmake +++ b/ios.toolchain.cmake @@ -154,7 +154,8 @@ cmake_minimum_required(VERSION 3.8.0) # CMake invokes the toolchain file twice during the first build, but only once during subsequent rebuilds. -if(DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) +# NOTE: To improve single-library build-times, provide the flag "OS_SINGLE_BUILD" as a build argument. +if(NOT DEFINED OS_SINGLE_BUILD AND DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) return() endif() set(ENV{_IOS_TOOLCHAIN_HAS_RUN} true) From 6dc6e42cb2e4a8651cbd07582135648e803fef1d Mon Sep 17 00:00:00 2001 From: Alexander Widerberg Date: Thu, 18 Jul 2024 21:53:41 +0200 Subject: [PATCH 2/2] Test inverse of has_run --- ios.toolchain.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios.toolchain.cmake b/ios.toolchain.cmake index 0f6dd46..d471421 100644 --- a/ios.toolchain.cmake +++ b/ios.toolchain.cmake @@ -155,7 +155,7 @@ cmake_minimum_required(VERSION 3.8.0) # CMake invokes the toolchain file twice during the first build, but only once during subsequent rebuilds. # NOTE: To improve single-library build-times, provide the flag "OS_SINGLE_BUILD" as a build argument. -if(NOT DEFINED OS_SINGLE_BUILD AND DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) +if(DEFINED OS_SINGLE_BUILD AND DEFINED ENV{_IOS_TOOLCHAIN_HAS_RUN}) return() endif() set(ENV{_IOS_TOOLCHAIN_HAS_RUN} true)