File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -95,22 +95,25 @@ add_flang_library(flangrti_shared
9595 )
9696
9797# Resolve symbols against libm
98- target_link_libraries (flangrti_shared m)
98+ if (NOT MSVC )
99+ target_link_libraries (flangrti_shared PUBLIC m)
100+ endif ()
101+
99102
100103# Import OpenMP
101104if (NOT DEFINED LIBOMP_EXPORT_DIR)
102105 find_library (
103106 FLANG_LIBOMP
104- libomp.so
107+ NAMES omp libomp
105108 HINTS ${CMAKE_BINARY_DIR} /lib)
106- target_link_libraries (flangrti_shared ${FLANG_LIBOMP} )
109+ target_link_libraries (flangrti_shared PUBLIC ${FLANG_LIBOMP} )
107110endif ()
108111
109112find_library (
110113 LIBPGMATH
111- libpgmath.so
114+ NAMES pgmath libpgmath
112115 HINTS ${CMAKE_BINARY_DIR} /lib)
113- target_link_libraries (flangrti_shared ${LIBPGMATH} )
116+ target_link_libraries (flangrti_shared PUBLIC ${LIBPGMATH} )
114117
115118if ( ${TARGET_ARCHITECTURE} STREQUAL "aarch64" )
116119 target_compile_definitions (flangrti_static PRIVATE TARGET_LINUX_ARM)
@@ -136,9 +139,10 @@ target_include_directories(flangrti_shared
136139set_target_properties (flangrti_shared flangrti_static
137140 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${FLANG_RTE_LIB_DIR} )
138141
139- target_compile_options (flangrti_static PRIVATE -fPIC)
140-
141- target_compile_options (flangrti_shared PRIVATE -fPIC)
142+ if (NOT MSVC )
143+ target_compile_options (flangrti_static PRIVATE -fPIC)
144+ target_compile_options (flangrti_shared PRIVATE -fPIC)
145+ endif ()
142146
143147target_compile_options (flangrti_static PUBLIC $<$<COMPILE_LANGUAGE:Fortran>:-Mreentrant>)
144148
You can’t perform that action at this time.
0 commit comments