Skip to content

Commit

Permalink
Merge branch 'develop' into feature/native-jambase
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Rivera committed Jun 25, 2020
2 parents 15e1928 + 34bcd0a commit 713c603
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 37 deletions.
70 changes: 42 additions & 28 deletions Jamroot.jam
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

import path ;
import package ;
import os ;
import "class" : new ;
import bison ;
import errors ;
import feature ;
import indirect ;
import os ;
# import package ;
import path ;
import set ;
import stage : add-install-dir ;
import toolset ;
import bison ;
import indirect ;
import "class" : new ;
import type ;
import virtual-target ;
import errors ;

path-constant SELF : . ;

Expand Down Expand Up @@ -169,18 +170,30 @@ explicit b2 ;
Installation of the engine, build, and example files.
|#

feature.feature b2-install-layout : standard portable : incidental propagated ;

add-install-dir b2prefix-standard : : prefix ;
add-install-dir b2bindir-standard : : bindir ;
add-install-dir b2coredir-standard : boost-build/src : datarootdir ;
add-install-dir b2examplesdir-standard : boost-build/examples : datarootdir ;

add-install-dir b2prefix-portable : : prefix ;
add-install-dir b2bindir-portable : : b2prefix-portable ;
add-install-dir b2coredir-portable : .b2 : b2prefix-portable ;
add-install-dir b2examplesdir-portable : .b2/examples : b2prefix-portable ;

local ext = "" ;
if [ os.on-windows ] || [ os.on-vms ]
{
ext = ".exe" ;
}

package.install boost-build-engine boost-build
: # properties
: # binaries
$(SELF)/src/engine/b2$(ext)
install b2-engine
: $(SELF)/src/engine/b2$(ext)
: <b2-install-layout>standard:<location>(b2bindir-standard)
<b2-install-layout>portable:<location>(b2bindir-portable)
;
explicit boost-build-engine ;
explicit b2-engine ;

local examples ;
for local e in [ glob-tree-ex $(SELF)/example : * : . .svn ]
Expand All @@ -190,18 +203,18 @@ for local e in [ glob-tree-ex $(SELF)/example : * : . .svn ]
examples += $(e) ;
}
}
package.install-data boost-build-examples
: # Which subdir of $prefix/share
boost-build
install b2-examples
: # What to install
$(examples)
: # What is the root of the directory
<install-source-root>.
: # What is the root of the directory
<install-source-root>example
# Which subdir of $prefix/share
<b2-install-layout>standard:<location>(b2examplesdir-standard)
<b2-install-layout>portable:<location>(b2examplesdir-portable)
;
explicit boost-build-examples ;
explicit b2-examples ;

local .core-sources =
$(SELF)/boost-build.jam
$(SELF)/src/build-system.jam
[ path.glob-tree $(SELF)/src/build : *.jam ]
[ path.glob-tree $(SELF)/src/contrib : *.jam ]
Expand All @@ -222,25 +235,26 @@ if $(python-exe)
;
}

package.install-data boost-build-core
: # Which subdir of $prefix/share
boost-build
: # What to install
install b2-core
: # What to install
$(.core-sources)
: # What is the root of the directory
<install-source-root>.
: # What is the root of the directory
<install-source-root>src
# Which subdir of $prefix/share
<b2-install-layout>standard:<location>(b2coredir-standard)
<b2-install-layout>portable:<location>(b2coredir-portable)
;
explicit boost-build-core ;
explicit b2-core ;

#|
Only install example files when requested to avoid bloating install footprint.
|#
if --with-examples in [ modules.peek : ARGV ]
{
alias install : boost-build-engine boost-build-core boost-build-examples ;
alias install : b2-engine b2-core b2-examples ;
}
else
{
alias install : boost-build-engine boost-build-core ;
alias install : b2-engine b2-core ;
}
explicit install ;
19 changes: 10 additions & 9 deletions src/engine/vswhere_usability_wrapper.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:: Copyright 2020 - Rene Ferdinand Rivera Morell
:: Copyright 2017 - Refael Ackermann
:: Copyright 2019 - Thomas Kent
:: Distributed under MIT style license
Expand All @@ -16,15 +17,16 @@ if errorlevel 1 goto :no-vswhere
set VSWHERE_REQ=-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64
set VSWHERE_PRP=-property installationPath

REM Visual Studio 2017 (15.X, toolset 14.1)
set VSWHERE_LMT=-version "[15.0,16.0)"
SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
REM Visual Studio Unknown Version, Beyond 2019
set VSWHERE_LMT=-version "[17.0,18.0)"
set VSWHERE_PRERELEASE=-prerelease
SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE%
for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
endlocal
echo Found with vswhere %%i
@rem comment out setting VCINSTALLDIR for Boost.build
@rem set "VCINSTALLDIR=%%i\VC\"
set "VS150COMNTOOLS=%%i\Common7\Tools\"
set "VSUNKCOMNTOOLS=%%i\Common7\Tools\"
exit /B 0
)

Expand All @@ -40,16 +42,15 @@ for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
exit /B 0
)

REM Visual Studio Unknown Version, Beyond 2019
set VSWHERE_LMT=-version "[17.0)"
set VSWHERE_PRERELEASE=-prerelease
SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE%
REM Visual Studio 2017 (15.X, toolset 14.1)
set VSWHERE_LMT=-version "[15.0,16.0)"
SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
endlocal
echo Found with vswhere %%i
@rem comment out setting VCINSTALLDIR for Boost.build
@rem set "VCINSTALLDIR=%%i\VC\"
set "VSUNKCOMNTOOLS=%%i\Common7\Tools\"
set "VS150COMNTOOLS=%%i\Common7\Tools\"
exit /B 0
)

Expand Down

0 comments on commit 713c603

Please sign in to comment.