mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Add new options and docs for pybind11_add_module
See the documentation for a description of the options.
This commit is contained in:
committed by
Wenzel Jakob
parent
b0f3885c95
commit
0cbec5c96e
@@ -6,7 +6,7 @@ set(CMAKE_MODULE_PATH "")
|
||||
find_package(pybind11 CONFIG REQUIRED)
|
||||
message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}")
|
||||
|
||||
pybind11_add_module(test_cmake_build SHARED ../main.cpp)
|
||||
pybind11_add_module(test_cmake_build SHARED NO_EXTRAS ../main.cpp)
|
||||
|
||||
add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:test_cmake_build>
|
||||
${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME})
|
||||
|
||||
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.12)
|
||||
project(test_subdirectory_module CXX)
|
||||
|
||||
add_subdirectory(${PYBIND11_PROJECT_DIR} pybind11)
|
||||
pybind11_add_module(test_cmake_build ../main.cpp)
|
||||
pybind11_add_module(test_cmake_build THIN_LTO ../main.cpp)
|
||||
|
||||
add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:test_cmake_build>
|
||||
${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME})
|
||||
|
||||
Reference in New Issue
Block a user