mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
Fix path to libsize.py (#658)
Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR as the base of the path to libsize.py. This fixes an error if pybind11 is being built directly within another project.
This commit is contained in:
parent
e15fa9f99a
commit
5e92b3e608
@ -107,7 +107,7 @@ endif()
|
|||||||
|
|
||||||
# And another to show the .so size and, if a previous size, compare it:
|
# And another to show the .so size and, if a previous size, compare it:
|
||||||
add_custom_command(TARGET pybind11_tests POST_BUILD
|
add_custom_command(TARGET pybind11_tests POST_BUILD
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/libsize.py
|
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/libsize.py
|
||||||
$<TARGET_FILE:pybind11_tests> ${CMAKE_CURRENT_BINARY_DIR}/sosize-$<TARGET_FILE_NAME:pybind11_tests>.txt)
|
$<TARGET_FILE:pybind11_tests> ${CMAKE_CURRENT_BINARY_DIR}/sosize-$<TARGET_FILE_NAME:pybind11_tests>.txt)
|
||||||
|
|
||||||
# Test CMake build using functions and targets from subdirectory or installed location
|
# Test CMake build using functions and targets from subdirectory or installed location
|
||||||
|
Loading…
Reference in New Issue
Block a user