File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -522,8 +522,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "XL")
522
522
endif ()
523
523
524
524
include (CheckLibraryExists)
525
- find_library (HAVE_LIBM m)
526
- mark_as_advanced (HAVE_LIBM )
525
+ find_library (LIBM_LIBRARY m)
526
+ mark_as_advanced (LIBM_LIBRARY )
527
527
check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
528
528
check_library_exists(m feenableexcept "" HAVE_FEENABLEEXCEPT)
529
529
check_library_exists(m fedisableexcept "" HAVE_FEDISABLEEXCEPT)
@@ -893,8 +893,8 @@ if(HAVE_TIME_H AND HAVE_UNISTD_H AND HAVE_CLOCK_GETTIME)
893
893
endif ()
894
894
895
895
# Math and thread libraries must often come after all others when linking...
896
- if (HAVE_LIBM )
897
- list (APPEND GMX_PUBLIC_LIBRARIES m )
896
+ if (LIBM_LIBRARY )
897
+ list (APPEND GMX_PUBLIC_LIBRARIES ${LIBM_LIBRARY} )
898
898
endif ()
899
899
900
900
option (GMX_NACL "Configure for Native Client builds" OFF )
Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ if (${FFTW}_FOUND)
87
87
#The user could specify trash in ${FFTW}_LIBRARY, so test if we can link it
88
88
include (CheckLibraryExists)
89
89
include (gmxOptionUtilities)
90
- if (HAVE_LIBM )
90
+ if (LIBM_LIBRARY )
91
91
#adding MATH_LIBRARIES here to allow static libs, this does not harm us as we are anyway using it
92
- set (CMAKE_REQUIRED_LIBRARIES m )
92
+ set (CMAKE_REQUIRED_LIBRARIES ${LIBM_LIBRARY} )
93
93
endif ()
94
94
gmx_check_if_changed(FFTW_LIBRARY_CHANGED ${FFTW} _LIBRARIES)
95
95
if (FFTW_LIBRARY_CHANGED)
Original file line number Diff line number Diff line change @@ -30,5 +30,14 @@ Handle trajectory reading error in gmx tcaf
30
30
Fixes that affect portability
31
31
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
32
33
+ Fix linking error on Windows with Intel oneAPI
34
+ """"""""""""""""""""""""""""""""""""""""""""""
35
+
36
+ Fix ``LINK : fatal error LNK1181: cannot open input file ‘m.lib’ ``
37
+ error encountered when using ``icx `` compiler on Windows by using
38
+ dynamically-detected name for the ``m `` library.
39
+
40
+ :issue: `5240 `
41
+
33
42
Miscellaneous
34
43
^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments