fix(build): cleaner CMake printouts & IDE folders (#3479)

This commit is contained in:
Henry Schreiner
2021-11-18 10:01:24 -05:00
committed by GitHub
parent ff51fcb773
commit 15f8d7c12e
2 changed files with 16 additions and 6 deletions

View File

@@ -429,6 +429,14 @@ foreach(target ${test_targets})
endif()
endforeach()
# Provide nice organisation in IDEs
if(NOT CMAKE_VERSION VERSION_LESS 3.8)
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include"
PREFIX "Header Files"
FILES ${PYBIND11_HEADERS})
endif()
# Make sure pytest is found or produce a warning
pybind11_find_import(pytest VERSION 3.1)