diff --git a/cmake/FindPytest.cmake b/cmake/FindPytest.cmake index ec58e35..341d697 100644 --- a/cmake/FindPytest.cmake +++ b/cmake/FindPytest.cmake @@ -71,8 +71,16 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest) endif() # Convert paths to CMake-friendly format. - cmake_path(CONVERT "$ENV{${LIBRARY_ENV_NAME}}" TO_CMAKE_PATH_LIST LIBRARY_PATH) - cmake_path(CONVERT "$ENV{PYTHONPATH}" TO_CMAKE_PATH_LIST PYTHON_PATH) + if(DEFINED ENV{${LIBRARY_ENV_NAME}}) + cmake_path(CONVERT "$ENV{${LIBRARY_ENV_NAME}}" TO_CMAKE_PATH_LIST LIBRARY_PATH) + else() + set(LIBRARY_PATH "") + endif() + if(DEFINED ENV{PYTHONPATH}) + cmake_path(CONVERT "$ENV{PYTHONPATH}" TO_CMAKE_PATH_LIST PYTHON_PATH) + else() + set(PYTHON_PATH "") + endif() # Prepend specified paths to the library and Python paths. if (_LIBRARY_PATH_PREPEND) diff --git a/doc/release/release_notes.rst b/doc/release/release_notes.rst index abc458a..391616f 100644 --- a/doc/release/release_notes.rst +++ b/doc/release/release_notes.rst @@ -4,6 +4,16 @@ Release Notes ************* +.. release:: Upcoming + + .. change:: fixed + + Updated scripts to prevent uninitialized variable errors when using `-Werror=dev + `_ + and `--warn-uninitialized + `_ + options. Thanks :github_user:`corrodedHash`! + .. release:: 0.11.3 :date: 2025-01-19