File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,12 @@ add_library(${BLASLIB}
152152 $<TARGET_OBJECTS:${BLASLIB} _obj>
153153 $<$<BOOL :${BUILD_INDEX64_EXT_API} >: $<TARGET_OBJECTS:${BLASLIB} _64_obj>>)
154154
155+ # For flang, use C linker instead of Fortran linker to avoid macOS-specific flags
156+ # that CMake adds (tested CMake 4.2).
157+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" )
158+ set_target_properties (${BLASLIB} PROPERTIES LINKER_LANGUAGE C)
159+ endif ()
160+
155161set_target_properties (
156162 ${BLASLIB} PROPERTIES
157163 VERSION ${LAPACK_VERSION}
Original file line number Diff line number Diff line change @@ -578,6 +578,11 @@ add_library(${LAPACKLIB}
578578 $<TARGET_OBJECTS:mod_files>
579579 $<TARGET_OBJECTS:${LAPACKLIB} _obj>
580580 $<$<BOOL :${BUILD_INDEX64_EXT_API} >: $<TARGET_OBJECTS:${LAPACKLIB} _64_obj>>)
581+ # For flang, use C linker instead of Fortran linker to avoid macOS-specific flags
582+ # that CMake adds (tested CMake 4.2).
583+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" )
584+ set_target_properties (${LAPACKLIB} PROPERTIES LINKER_LANGUAGE C)
585+ endif ()
581586set_target_properties (
582587 ${LAPACKLIB} PROPERTIES
583588 VERSION ${LAPACK_VERSION}
You can’t perform that action at this time.
0 commit comments