@@ -12,13 +12,17 @@ option(OPTIMIZATION_REPORT
12
12
OFF
13
13
)
14
14
15
- find_package (Python COMPONENTS Interpreter Development REQUIRED )
16
- find_package (NumPy REQUIRED )
15
+ find_package (Python COMPONENTS Interpreter Development NumPy REQUIRED )
16
+
17
+ # Print out the discovered paths
18
+ include (CMakePrintHelpers )
19
+ cmake_print_variables (Python_INCLUDE_DIRS )
20
+ cmake_print_variables (Python_LIBRARIES )
21
+ cmake_print_variables (Python_NumPy_INCLUDE_DIRS )
17
22
18
23
set (CYTHON_FLAGS "-t -w \" ${CMAKE_SOURCE_DIR} \" " )
19
24
find_package (Cython REQUIRED )
20
25
21
- set (MKL_ARCH intel64 )
22
26
set (MKL_LINK sdl )
23
27
find_package (MKL REQUIRED )
24
28
@@ -104,7 +108,7 @@ set_target_properties(${_trgt} PROPERTIES
104
108
CMAKE_POSITION_INDEPENDENT_CODE ON
105
109
C_STANDARD 99
106
110
)
107
- target_include_directories (${_trgt} PUBLIC mkl_umath/src/ ${NumPy_INCLUDE_DIR } ${PYTHON_INCLUDE_DIR } )
111
+ target_include_directories (${_trgt} PUBLIC mkl_umath/src/ ${Python_NumPy_INCLUDE_DIRS } ${Python_INCLUDE_DIRS } )
108
112
target_link_libraries (${_trgt} PUBLIC MKL::MKL ${Python_LIBRARIES} )
109
113
target_link_options (${_trgt} PUBLIC ${_linker_options} )
110
114
target_compile_options (${_trgt} PUBLIC -fveclib=SVML )
@@ -119,7 +123,7 @@ install(TARGETS ${_trgt}
119
123
)
120
124
121
125
python_add_library (_ufuncs MODULE WITH_SOABI "mkl_umath/src/ufuncsmodule.c" "mkl_umath/src/__umath_generated.c" )
122
- target_include_directories (_ufuncs PRIVATE "mkl_umath/src" ${NumPy_INCLUDE_DIR } ${MKL_INCLUDE_DIR} )
126
+ target_include_directories (_ufuncs PRIVATE "mkl_umath/src" ${Python_NumPy_INCLUDE_DIRS } ${MKL_INCLUDE_DIR} )
123
127
target_compile_definitions (_ufuncs PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION )
124
128
target_link_options (_ufuncs PRIVATE ${_linker_options} )
125
129
target_link_libraries (_ufuncs PRIVATE mkl_umath_loops )
@@ -131,7 +135,7 @@ install(TARGETS _ufuncs LIBRARY DESTINATION mkl_umath)
131
135
132
136
add_cython_target (_patch "mkl_umath/src/_patch.pyx" C OUTPUT_VAR _generated_src )
133
137
Python_add_library (_patch MODULE WITH_SOABI ${_generated_src} )
134
- target_include_directories (_patch PRIVATE "mkl_umath/src/" ${NumPy_INCLUDE_DIR } ${PYTHON_INCLUDE_DIR } )
138
+ target_include_directories (_patch PRIVATE "mkl_umath/src/" ${Python_NumPy_INCLUDE_DIRS } ${Python_INCLUDE_DIRS } )
135
139
target_compile_definitions (_patch PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION )
136
140
target_link_libraries (_patch PRIVATE mkl_umath_loops )
137
141
set_target_properties (_patch PROPERTIES C_STANDARD 99 )
0 commit comments