mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
FindPython: Introduce NumPy component
Fixes: #18678 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
14
Tests/FindPython/NumPyOnly/CMakeLists.txt
Normal file
14
Tests/FindPython/NumPyOnly/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
project(TestNumPyOnly C)
|
||||
|
||||
find_package(Python2 REQUIRED COMPONENTS NumPy)
|
||||
find_package(Python3 REQUIRED COMPONENTS NumPy)
|
||||
|
||||
Python2_add_library (arraytest2 MODULE ../NumPy/arraytest.c)
|
||||
target_compile_definitions (arraytest2 PRIVATE PYTHON2)
|
||||
target_link_libraries (arraytest2 PRIVATE Python2::NumPy)
|
||||
|
||||
Python3_add_library (arraytest3 MODULE ../NumPy/arraytest.c)
|
||||
target_compile_definitions (arraytest3 PRIVATE PYTHON3)
|
||||
target_link_libraries (arraytest3 PRIVATE Python3::NumPy)
|
||||
Reference in New Issue
Block a user