diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2020-07-23 08:58:19 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2020-07-23 08:58:19 +0200 |
commit | 444e535f000fd7b53dadf6726d5cd29ac34cc75f (patch) | |
tree | 1ac675d8f0381de320849294fa70c946f631e7f6 /3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt | |
parent | e6991ad5dc79f6118838f091cc05f10d3377eb4a (diff) | |
download | nextpnr-444e535f000fd7b53dadf6726d5cd29ac34cc75f.tar.gz nextpnr-444e535f000fd7b53dadf6726d5cd29ac34cc75f.tar.bz2 nextpnr-444e535f000fd7b53dadf6726d5cd29ac34cc75f.zip |
Add pybind11 2.5 source
Diffstat (limited to '3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt')
-rw-r--r-- | 3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt b/3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt new file mode 100644 index 00000000..f7fc09c2 --- /dev/null +++ b/3rdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.0) +project(test_installed_embed CXX) + +set(CMAKE_MODULE_PATH "") +find_package(pybind11 CONFIG REQUIRED) +message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") + +add_executable(test_cmake_build ../embed.cpp) +target_link_libraries(test_cmake_build PRIVATE pybind11::embed) + +# Do not treat includes from IMPORTED target as SYSTEM (Python headers in pybind11::embed). +# This may be needed to resolve header conflicts, e.g. between Python release and debug headers. +set_target_properties(test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON) + +add_custom_target(check $<TARGET_FILE:test_cmake_build> ${PROJECT_SOURCE_DIR}/../test.py) |