Ticket #5864: mpi-windows-build3.patch

File mpi-windows-build3.patch, 1.6 KB (added by Taras Kozlov, 9 years ago)

Fix build on windows

  • tools/build/v2/tools/mpi.jam

    old new  
    146146    # Every kind of parameter not mentioned here will be placed in both
    147147    # cxxflags and linkflags, because we don't know where they should go.
    148148    local feature_kinds-D = "define" ;
     149    local feature_kinds/D = "define" ;
    149150    local feature_kinds-I = "include" ;
     151    local feature_kinds/I = "include" ;
    150152    local feature_kinds-L = "library-path" ;
     153    local feature_kinds/LIBPATH: = "library-path" ;
    151154    local feature_kinds-l = "find-shared-library" ;
    152155
    153156    while $(cmdline) {
     
    155158        # Check for one of the feature prefixes we know about. If we
    156159        # find one (and the associated value is nonempty), convert it
    157160        # into a feature.
    158         local match = [ MATCH "^(-.)(.*)" : $(cmdline) ] ;
     161        local match = [ MATCH "^(-.|/LIBPATH:|/.)(.*)" : $(cmdline) ] ;
    159162        local matched ;
    160163        if $(match) && $(match[2]) {
    161164           local prefix = $(match[1]) ;
     
    231234# not. Returns true for an exit code of zero, false otherwise.
    232235local rule safe-shell-command ( cmdline )
    233236{
    234   local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ;
     237  local result ;
     238 
     239  if [ os.name ] = NT {
     240    result = [ SHELL "$(cmdline) >NUL 2>NUL && echo SSCOK" ] ;
     241  } else {
     242    result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ;
     243  }
     244 
    235245  return [ MATCH ".*(SSCOK).*" : $(result) ] ;
    236246}
    237247