@@ -12,13 +12,17 @@ option(OPTIMIZATION_REPORT
1212 OFF
1313)
1414
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)
1722
1823set (CYTHON_FLAGS "-t -w \" ${CMAKE_SOURCE_DIR} \" " )
1924find_package (Cython REQUIRED)
2025
21- set (MKL_ARCH intel64)
2226set (MKL_LINK sdl)
2327find_package (MKL REQUIRED)
2428
@@ -104,7 +108,7 @@ set_target_properties(${_trgt} PROPERTIES
104108 CMAKE_POSITION_INDEPENDENT_CODE ON
105109 C_STANDARD 99
106110)
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 } )
108112target_link_libraries (${_trgt} PUBLIC MKL::MKL ${Python_LIBRARIES} )
109113target_link_options (${_trgt} PUBLIC ${_linker_options} )
110114target_compile_options (${_trgt} PUBLIC -fveclib=SVML)
@@ -119,7 +123,7 @@ install(TARGETS ${_trgt}
119123)
120124
121125python_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} )
123127target_compile_definitions (_ufuncs PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
124128target_link_options (_ufuncs PRIVATE ${_linker_options} )
125129target_link_libraries (_ufuncs PRIVATE mkl_umath_loops)
@@ -131,7 +135,7 @@ install(TARGETS _ufuncs LIBRARY DESTINATION mkl_umath)
131135
132136add_cython_target(_patch "mkl_umath/src/_patch.pyx" C OUTPUT_VAR _generated_src)
133137Python_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 } )
135139target_compile_definitions (_patch PUBLIC NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
136140target_link_libraries (_patch PRIVATE mkl_umath_loops)
137141set_target_properties (_patch PROPERTIES C_STANDARD 99)
0 commit comments