BUG: WM_THIRD_PARTY_DIR not set in csh (bug noted in merge !222)

- local csh variable in foreach was masking the setenv
This commit is contained in:
Mark Olesen 2018-12-08 18:01:44 +01:00
parent 5e4d7386ec
commit c45ff8cefc
2 changed files with 7 additions and 5 deletions

View File

@ -45,16 +45,17 @@ source "$WM_PROJECT_DIR/etc/config.csh/functions"
setenv WM_THIRD_PARTY_DIR
set foundDir=''
_foamEcho "Locating ThirdParty directory"
foreach WM_THIRD_PARTY_DIR (\
foreach foamDir (\
"$WM_PROJECT_DIR/ThirdParty" \
"$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \
"$prefixDir/ThirdParty-v$WM_PROJECT_API" \
"$prefixDir/ThirdParty-$WM_PROJECT_API" \
"$prefixDir/ThirdParty-common" \
)
_foamEcho "... $WM_THIRD_PARTY_DIR"
if ( -d "$WM_THIRD_PARTY_DIR" ) then
if ( -f "$WM_THIRD_PARTY_DIR/Allwmake" || -d "$WM_THIRD_PARTY_DIR/platforms" ) then
_foamEcho "... $foamDir"
if ( -d "$foamDir" ) then
if ( -f "$foamDir/Allwmake" || -d "$foamDir/platforms" ) then
setenv WM_THIRD_PARTY_DIR "$foamDir"
set foundDir=true
break
endif
@ -182,6 +183,6 @@ unalias _foamAddLib
unalias _foamAddLibAuto
# Variables (done as final statement for a clean exit code)
unset cleaned foamOldDirs foundDir prefixDir
unset cleaned foamOldDirs foundDir foamDir prefixDir
#------------------------------------------------------------------------------

View File

@ -43,6 +43,7 @@ unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_TYPE
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION