kripken/emscripten — pull request #2359 by mhenschel (2014-05-16 19:39:02+00:00)
Title: Turn on response files in cmake toolchain file

This fixes issue https://github.com/kripken/emscripten/issues/2295

I think the individual CMAKE_C/CXX_ARCHIVE_CREATE and CMAKE_C/CXX_ARCHIVE_APPEND directives are not necessary anymore. I think they used to be necessary because CMAKE_AR was not set correctly as a cache variable before.
The CMAKE_C/CXX_CREATE_STATIC_LIBRARY calls are required to force cmake to use response files for objects. This is necessary because cmake has a hard coded limit for the command line which does not work well for windows because emscripten uses bat files to call the compiler and bat files have a maximum command line length that is smaller than the general limit for windows executables.

I was thinking about turning on response files for windows only but I didn't see a reason not to enable them for the other platforms emscripten runs on.

I ran the tests but had 12 failures. But I think if something in the cmake toolchain file would be wrong there would have been more of them right?