Skip to content

Commit

Permalink
FIX(cmake): Don't set WORKING_DIRECTORY for ExternalProject_Add()
Browse files Browse the repository at this point in the history
This is a workaround for a bug that appeared in a recent version of CMake.

WORKING_DIRECTORY prepends the specified path to a list instead of using it directly, resulting in:

cd /D D:\a\1\b\overlay\overlay_xcompile-prefix;D:\a\1\b\overlay\overlay_xcompile-prefix\src\overlay_xcompile-build

For reference, this causes the build to fail on Windows with the following error:

"The filename, directory name, or volume label syntax is incorrect."

This commit simply removes the parameter from the ExternalProject_Add() call, since the default working directory is perfectly fine.
  • Loading branch information
davidebeatrici authored and Hartmnt committed Dec 9, 2024
1 parent 130ef1e commit a7e7566
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions overlay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ if(64_BIT AND MSVC)
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
CMAKE_GENERATOR_PLATFORM "Win32"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
else()
Expand All @@ -194,7 +193,6 @@ if(64_BIT AND MSVC)
"-Dsymbols=${symbols}"
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
endif()
Expand Down

0 comments on commit a7e7566

Please sign in to comment.