mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
tests: also set executable on subdir tests
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
9874461878
commit
574ee0cac1
@ -16,6 +16,12 @@ set(PYBIND11_INSTALL
|
||||
CACHE BOOL "")
|
||||
set(PYBIND11_EXPORT_NAME test_export)
|
||||
|
||||
# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests
|
||||
# (makes transition easier while we support both modes).
|
||||
if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
|
||||
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
add_subdirectory("${pybind11_SOURCE_DIR}" pybind11)
|
||||
|
||||
# Test basic target functionality
|
||||
|
@ -11,6 +11,12 @@ endif()
|
||||
|
||||
project(test_subdirectory_function CXX)
|
||||
|
||||
# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests
|
||||
# (makes transition easier while we support both modes).
|
||||
if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
|
||||
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
add_subdirectory("${pybind11_SOURCE_DIR}" pybind11)
|
||||
pybind11_add_module(test_subdirectory_function ../main.cpp)
|
||||
set_target_properties(test_subdirectory_function PROPERTIES OUTPUT_NAME test_cmake_build)
|
||||
|
@ -11,6 +11,12 @@ endif()
|
||||
|
||||
project(test_subdirectory_target CXX)
|
||||
|
||||
# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests
|
||||
# (makes transition easier while we support both modes).
|
||||
if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
|
||||
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
add_subdirectory("${pybind11_SOURCE_DIR}" pybind11)
|
||||
|
||||
add_library(test_subdirectory_target MODULE ../main.cpp)
|
||||
|
Loading…
Reference in New Issue
Block a user