File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,8 +309,8 @@ if (USE_OPENMP)
309309endif ()
310310
311311# Fix "Argument list too long" for macOS - mostly seen with older OS versions on POWERPC or Intel CPUs
312- if (APPLE )
313- # Use response files
312+ if (APPLE AND " ${ CMAKE_GENERATOR } " MATCHES ".*Makefiles" )
313+ # Use response files to get around the ARG_MAX limit, unless using the Ninja generator
314314 set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
315315 # Always build static library first
316316 if (BUILD_STATIC_LIBS)
@@ -333,7 +333,7 @@ if(APPLE)
333333 endif ()
334334 if (NOT NOFORTRAN)
335335 set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
336- set (CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND} )
336+ set (CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND} )
337337 if (BUILD_SHARED_LIBS )
338338 set (CMAKE_Fortran_CREATE_SHARED_LIBRARY
339339 "sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '"
You can’t perform that action at this time.
0 commit comments