From 30e2257f06dd8a91f125b8aaa7b79f2d92ef83ba Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Mon, 8 Feb 2016 15:26:34 +0200 Subject: [PATCH] Forced response files for build commands --- android.toolchain.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android.toolchain.cmake b/android.toolchain.cmake index ffa2612..d47f321 100644 --- a/android.toolchain.cmake +++ b/android.toolchain.cmake @@ -215,6 +215,16 @@ set( CMAKE_SYSTEM_VERSION 1 ) set( CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "" ) set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." ) +# force use response files for linking, archiving libs, and includes +# because the command lines may get too long +# This happens especially often in Windows, where the limit is just 32k +set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1) +set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1) +set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) +set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) +set(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1) +set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1) + # NDK search paths set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" ) if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )