mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-15 03:02:22 -06:00
CMake 3.27 deprecates compatibility with CMake < 3.5. Update find module tests to avoid the deprecation warning.
15 lines
521 B
CMake
15 lines
521 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
project(TestNumPyOnly LANGUAGES 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)
|