Skip to content

Commit b370c95

Browse files
committed
Add tracing for NumPy include path
1 parent 4b64466 commit b370c95

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@ find_package(oneDPL REQUIRED PATHS ${path_to_cmake_dir})
8888

8989
include(GNUInstallDirs)
9090

91+
if(NOT DEFINED ENV{MKL_ENABLE_INSTRUCTIONS})
92+
set(_UNSET_ENV_VAR_MKL_ENABLE_INSTRUCTIONS YES)
93+
set(ENV{MKL_ENABLE_INSTRUCTIONS} "SSE4_2")
94+
endif()
95+
96+
set(_PYTHON_PREFIX "Python")
97+
execute_process(COMMAND ${${_PYTHON_PREFIX}_EXECUTABLE} -c
98+
"import sys; import numpy; sys.stdout.write(numpy.get_include())"
99+
RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT
100+
OUTPUT_VARIABLE _${_PYTHON_PREFIX}_NumPy_PATH
101+
ERROR_QUIET
102+
OUTPUT_STRIP_TRAILING_WHITESPACE)
103+
104+
message(STATUS "NumPy detection result: ${_${_PYTHON_PREFIX}_RESULT}")
105+
message(STATUS "NumPy include path: ${_${_PYTHON_PREFIX}_NumPy_PATH}")
106+
91107
# find Python before enabling pybind11
92108
find_package(Python 3.10...<3.15 REQUIRED COMPONENTS Development.Module NumPy)
93109

0 commit comments

Comments
 (0)