Change-Id: I52e4fc9ebf2f59da57d8cf8f3e37cc79598c2f5f Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2229 Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
15 lines
564 B
CMake
15 lines
564 B
CMake
cmake_minimum_required(VERSION 2.8.12)
|
|
project(test_installed_module CXX)
|
|
|
|
set(CMAKE_MODULE_PATH "")
|
|
|
|
find_package(pybind11 CONFIG REQUIRED)
|
|
|
|
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS} (found version ${pybind11_VERSION})")
|
|
message(STATUS "Found Python: ${PYTHON_INCLUDE_DIRS} (found version ${PYTHON_VERSION_STRING})")
|
|
|
|
pybind11_add_module(test_installed_module SHARED main.cpp)
|
|
|
|
add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:test_installed_module>
|
|
${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test.py)
|