diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 763ad54a0..acb67fca0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -107,7 +107,7 @@ endif() # And another to show the .so size and, if a previous size, compare it: 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 $ ${CMAKE_CURRENT_BINARY_DIR}/sosize-$.txt) # Test CMake build using functions and targets from subdirectory or installed location