Fix: Failure to pass the full PATH to Blender ctests on Windows
Due to this bug only the first item in the current PATH on the system is used when running Blender. The PATH is appended to a string type variable, which is then used as one element of a list in build_files\cmake\testing.cmake line 24. Since in cmake the semicolon is a list element delimiter, we need to escape all the semicolons in our PATH string if we want to use the variable as a single entry in the list. Pull Request: https://projects.blender.org/blender/blender/pulls/146770
This commit is contained in:
@@ -1352,6 +1352,8 @@ set(PLATFORM_ENV_BUILD_DIRS "${_msvc_path}\;${LIBDIR}/epoxy/bin\;${LIBDIR}/tbb/b
|
||||
set(PLATFORM_ENV_BUILD "PATH=${PLATFORM_ENV_BUILD_DIRS}")
|
||||
# Install needs the additional folders from PLATFORM_ENV_BUILD_DIRS as well, as tools like:
|
||||
# `idiff` and `abcls` use the release mode dlls.
|
||||
set(PLATFORM_ENV_INSTALL "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/\;${PLATFORM_ENV_BUILD_DIRS}\;$ENV{PATH}")
|
||||
# Escape semicolons, since in cmake they denote elements in a list if surrounded by square brackets
|
||||
string(REPLACE ";" "\\;" ESCAPED_PATH "$ENV{PATH}")
|
||||
set(PLATFORM_ENV_INSTALL "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/\;${PLATFORM_ENV_BUILD_DIRS}\;${ESCAPED_PATH}")
|
||||
unset(_library_paths)
|
||||
unset(_msvc_path)
|
||||
|
||||
Reference in New Issue
Block a user