@@ -20,8 +20,6 @@ find_package(Cython REQUIRED)
20
20
21
21
set (MKL_ARCH intel64 )
22
22
set (MKL_LINK sdl )
23
- set (MKL_THREADING intel_thread )
24
- set (MKL_INTERFACE ilp64 )
25
23
find_package (MKL REQUIRED )
26
24
27
25
if (WIN32 )
@@ -101,16 +99,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
101
99
set (_linker_options ${MKL_UMATH_LINKER_OPTIONS} )
102
100
103
101
set (_trgt mkl_umath_loops )
104
- add_library (${_trgt} SHARED " mkl_umath/src/mkl_umath_loops.c" )
102
+ add_library (${_trgt} SHARED mkl_umath/src/mkl_umath_loops.c )
105
103
set_target_properties (${_trgt} PROPERTIES
106
104
CMAKE_POSITION_INDEPENDENT_CODE ON
107
105
C_STANDARD 99
108
106
)
109
- target_include_directories (${_trgt} PRIVATE " mkl_umath/src/" ${NumPy_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR} )
110
- target_link_libraries (${_trgt} PRIVATE mkl_rt ${Python_LIBRARIES} )
111
- target_link_options (${_trgt} PRIVATE ${_linker_options} )
112
- target_compile_options (${_trgt} PRIVATE -fveclib=SVML )
113
- target_compile_options (${_trgt} PRIVATE -fvectorize )
107
+ target_include_directories (${_trgt} PUBLIC mkl_umath/src/ ${NumPy_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR} )
108
+ target_link_libraries (${_trgt} PUBLIC MKL::MKL ${Python_LIBRARIES} )
109
+ target_link_options (${_trgt} PUBLIC ${_linker_options} )
110
+ target_compile_options (${_trgt} PUBLIC -fveclib=SVML )
111
+ target_compile_options (${_trgt} PUBLIC -fvectorize )
114
112
if (OPTIMIZATION_REPORT )
115
113
target_compile_options (${_trgt} PRIVATE -qopt-report=3 )
116
114
endif ()
@@ -120,11 +118,12 @@ install(TARGETS ${_trgt}
120
118
RUNTIME DESTINATION mkl_umath
121
119
)
122
120
123
- Python_add_library (_ufuncs MODULE WITH_SOABI "mkl_umath/src/ufuncsmodule.c" "mkl_umath/src/__umath_generated.c" )
121
+ python_add_library (_ufuncs MODULE WITH_SOABI "mkl_umath/src/ufuncsmodule.c" "mkl_umath/src/__umath_generated.c" )
124
122
target_include_directories (_ufuncs PRIVATE "mkl_umath/src" ${NumPy_INCLUDE_DIR} ${MKL_INCLUDE_DIR} )
125
123
target_compile_definitions (_ufuncs PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION )
126
124
target_link_options (_ufuncs PRIVATE ${_linker_options} )
127
125
target_link_libraries (_ufuncs PRIVATE mkl_umath_loops )
126
+ set_target_properties (_ufuncs PROPERTIES C_STANDARD 99 )
128
127
if (UNIX )
129
128
set_target_properties (_ufuncs PROPERTIES INSTALL_RPATH "$ORIGIN" )
130
129
endif ()
@@ -135,6 +134,7 @@ Python_add_library(_patch MODULE WITH_SOABI ${_generated_src})
135
134
target_include_directories (_patch PRIVATE "mkl_umath/src/" ${NumPy_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR} )
136
135
target_compile_definitions (_patch PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION )
137
136
target_link_libraries (_patch PRIVATE mkl_umath_loops )
137
+ set_target_properties (_patch PROPERTIES C_STANDARD 99 )
138
138
if (UNIX )
139
139
set_target_properties (_patch PROPERTIES INSTALL_RPATH "$ORIGIN" )
140
140
endif ()
0 commit comments