Merge pull request #1185 from adam-sim-dev/fix_issue_1184
For building shared libs with flang, use C linker instead of Fortran linker to avoid macOS-specific flags that CMake adds (tested CMake 4.2).
This commit is contained in:
@@ -152,6 +152,12 @@ add_library(${BLASLIB}
|
||||
$<TARGET_OBJECTS:${BLASLIB}_obj>
|
||||
$<$<BOOL:${BUILD_INDEX64_EXT_API}>: $<TARGET_OBJECTS:${BLASLIB}_64_obj>>)
|
||||
|
||||
# For flang, use C linker instead of Fortran linker to avoid macOS-specific flags
|
||||
# that CMake adds (tested CMake 4.2).
|
||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
|
||||
set_target_properties (${BLASLIB} PROPERTIES LINKER_LANGUAGE C)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${BLASLIB} PROPERTIES
|
||||
VERSION ${LAPACK_VERSION}
|
||||
|
||||
@@ -578,6 +578,11 @@ add_library(${LAPACKLIB}
|
||||
$<TARGET_OBJECTS:mod_files>
|
||||
$<TARGET_OBJECTS:${LAPACKLIB}_obj>
|
||||
$<$<BOOL:${BUILD_INDEX64_EXT_API}>: $<TARGET_OBJECTS:${LAPACKLIB}_64_obj>>)
|
||||
# For flang, use C linker instead of Fortran linker to avoid macOS-specific flags
|
||||
# that CMake adds (tested CMake 4.2).
|
||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
|
||||
set_target_properties (${LAPACKLIB} PROPERTIES LINKER_LANGUAGE C)
|
||||
endif()
|
||||
set_target_properties(
|
||||
${LAPACKLIB} PROPERTIES
|
||||
VERSION ${LAPACK_VERSION}
|
||||
|
||||
Reference in New Issue
Block a user