File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,8 +310,10 @@ endif()
310310
311311# Fix "Argument list too long" for macOS - mostly seen with older OS versions on POWERPC or Intel CPUs
312312if (APPLE )
313- # Use response files
314- set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
313+ # Use response files to get around the ARG_MAX limit, unless using the Ninja generator
314+ if ("${CMAKE_GENERATOR} " MATCHES ".*Makefiles" )
315+ set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
316+ endif ()
315317 # Always build static library first
316318 if (BUILD_STATIC_LIBS)
317319 set (STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} /lib${OpenBLAS_LIBNAME} .a" )
@@ -332,8 +334,10 @@ if(APPLE)
332334 set (OMP_LIB "" )
333335 endif ()
334336 if (NOT NOFORTRAN)
335- set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
336- set (CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND} )
337+ if ("${CMAKE_GENERATOR} " MATCHES ".*Makefiles" )
338+ set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
339+ endif ()
340+ set (CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND} )
337341 if (BUILD_SHARED_LIBS )
338342 set (CMAKE_Fortran_CREATE_SHARED_LIBRARY
339343 "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