Skip to content

Commit 3d8f886

Browse files
committed
improvement: reworked the way to pass .def files to compilers on Windows
1 parent cd102c1 commit 3d8f886

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,23 +302,20 @@ set(targets_to_install "")
302302
if (BUILD_SHARED_LIBS)
303303
add_library(minpack_SHARED SHARED "")
304304
target_sources(minpack_SHARED PRIVATE ${minpack_source_files})
305+
306+
if (WIN32)
307+
target_sources(minpack_SHARED PRIVATE ${minpack_def_file})
308+
endif()
305309

306310
get_filename_component(Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
307311

308312
if ("${Fortran_COMPILER_NAME}" MATCHES "ifx|ifort")
309313
if (WIN32)
310-
target_sources(minpack_SHARED PRIVATE ${minpack_def_file})
311314
list(APPEND minpack_Fflags ${minpack_intel_specific_Fflags_for_Win})
312315
else()
313316
list(APPEND minpack_Fflags ${minpack_intel_specific_Fflags_for_Unix})
314317
endif()
315318
target_compile_options(minpack_SHARED PRIVATE ${minpack_Fflags})
316-
elseif("${Fortran_COMPILER_NAME}" MATCHES "flang(\\-new)?")
317-
if (WIN32)
318-
target_sources(minpack_SHARED PRIVATE ${minpack_def_file})
319-
else()
320-
# TODO
321-
endif()
322319
else()
323320
# TODO: implement other compilers
324321
endif()

0 commit comments

Comments
 (0)