Skip to content
Snippets Groups Projects
Commit 35d14196 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

Defend against cygwin-style AUTOBUILD path in environment.

parent 72aae0db
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,9 @@ IF (NOT AUTOBUILD_EXECUTABLE) ...@@ -13,6 +13,9 @@ IF (NOT AUTOBUILD_EXECUTABLE)
# If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var # If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var
IF (DEFINED ENV{AUTOBUILD}) IF (DEFINED ENV{AUTOBUILD})
SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD}) SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD})
# In case $AUTOBUILD is a cygwin path, fix it back to Windows style
STRING(REGEX REPLACE "^/cygdrive/(.)/" "\\1:/" AUTOBUILD_EXECUTABLE
"${AUTOBUILD_EXECUTABLE}")
ELSE (DEFINED ENV{AUTOBUILD}) ELSE (DEFINED ENV{AUTOBUILD})
IF(WIN32) IF(WIN32)
SET(AUTOBUILD_EXE_NAMES autobuild.cmd autobuild.exe) SET(AUTOBUILD_EXE_NAMES autobuild.cmd autobuild.exe)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment