style: avoid using unintialized variables (#2806)

* style: avoid using unintialized variables

Tested with cmake --warn-unintialized -S . -B build

* refactor: use function for possibly uninit vars
This commit is contained in:
Henry Schreiner
2021-01-19 18:48:22 -05:00
committed by GitHub
parent 87f5aff4a7
commit eb83feefff
8 changed files with 41 additions and 9 deletions

View File

@@ -73,6 +73,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
set(pybind11_system "")
else()
set(PYBIND11_MASTER_PROJECT OFF)
set(pybind11_system SYSTEM)