From c0fcd18329fb0cf477a6beac8629e75420d05de6 Mon Sep 17 00:00:00 2001 From: Volo Zyko Date: Fri, 20 Dec 2013 15:16:33 +0200 Subject: Fixed small problems which exhibit themself when building projects with too many source files. When there are too many source files and one builds static libraray cmake splits the whole list of files into several invocations of library archiver. In order this to work cmake needs to know both how to create and how to append to archive. Another related issue is that emscripten code fails when links a final javascript code if a command line of a link command is too long (this 'too long' is very OS dependent). Related discussion can be found in issue #1931. Conflicts: AUTHORS --- cmake/Platform/Emscripten.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake') diff --git a/cmake/Platform/Emscripten.cmake b/cmake/Platform/Emscripten.cmake index c30632ca..ef813eb8 100644 --- a/cmake/Platform/Emscripten.cmake +++ b/cmake/Platform/Emscripten.cmake @@ -109,6 +109,8 @@ set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") # Specify the program to use when building static libraries. Force Emscripten-related command line options to clang. set(CMAKE_CXX_ARCHIVE_CREATE "${CMAKE_AR} rc ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}") set(CMAKE_C_ARCHIVE_CREATE "${CMAKE_AR} rc ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}") +set(CMAKE_CXX_ARCHIVE_APPEND "${CMAKE_AR} r ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}") +set(CMAKE_C_ARCHIVE_APPEND "${CMAKE_AR} r ${CMAKE_START_TEMP_FILE} ${CMAKE_END_TEMP_FILE}") # Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to detect when building using Emscripten. # There seems to be some kind of bug with CMake, so you might need to define this manually on the command line with "-DEMSCRIPTEN=1". -- cgit v1.2.3-18-g5258