Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 1944593

Browse files
authored
[packages] Fixes #527 - Added VisualStudio 2019 support.
- Added package VisualC-16 (note, no .0 suffix now, since it is intended to support all minor releases) - AppVeyor CI updated to test against the latest VisualStudio 2019 support they provide - Add new command line option, --VisualC.discoverprereleases, which allows vswhere to inspect prerelease editions too. - Updated vswhere NuGet to version 2.6.7. - Updated tests package definitions to include VisualC-16. - Various fixes to scripts to support VisualStudio 2019.
1 parent 8c2bc0a commit 1944593

File tree

68 files changed

+714
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+714
-44
lines changed

.appveyor.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
image:
2+
- Visual Studio 2019 Preview
23
- Visual Studio 2017
34
- Ubuntu
45
- Ubuntu1804
@@ -16,6 +17,18 @@ for:
1617
- image: Ubuntu1804
1718
environment:
1819
GCC_VERSION: 7
20+
- matrix:
21+
only:
22+
- image: Visual Studio 2017
23+
environment:
24+
VC_VERSION: 15.0
25+
VC_PRERELEASE_ARGS:
26+
- matrix:
27+
only:
28+
- image: Visual Studio 2019 Preview
29+
environment:
30+
VC_VERSION: 16
31+
VC_PRERELEASE_ARGS: "--VisualC.discoverprereleases"
1932
install:
2033
- cmd: powershell choco install doxygen.portable --version 1.8.11 || exit 0
2134
- sh: ./codingtools/install_ubuntu_dependencies.sh
@@ -38,9 +51,9 @@ test_script:
3851
- cd bam_publish
3952
- cmd: "SET PATH=C:\\Python27-x64;%PATH%"
4053
- cmd: env.bat
41-
- cmd: python tests\runtests.py -x Mingw --VisualC.version=15.0 -b Native -c debug -c profile -j0 -d
42-
- cmd: python tests\runtests.py -x Mingw --VisualC.version=15.0 -b VSSolution -c debug -c profile -j0 -d
43-
- cmd: python tests\runtests.py -x Mingw --VisualC.version=15.0 -b MakeFile -c debug -c profile -j0 -d --MakeFile.format=NMAKE
54+
- cmd: python tests\runtests.py -x Mingw --VisualC.version=%VC_VERSION% %VC_PRERELEASE_ARGS% -b Native -c debug -c profile -j0 -d
55+
- cmd: python tests\runtests.py -x Mingw --VisualC.version=%VC_VERSION% %VC_PRERELEASE_ARGS% -b VSSolution -c debug -c profile -j0 -d
56+
- cmd: python tests\runtests.py -x Mingw --VisualC.version=%VC_VERSION% %VC_PRERELEASE_ARGS% -b MakeFile -c debug -c profile -j0 -d --MakeFile.format=NMAKE
4457
- sh: source env.sh
4558
- sh: python tests/runtests.py --Gcc.version=$GCC_VERSION -b Native -c debug -c profile -j0 -d
4659
- sh: python tests/runtests.py --Gcc.version=$GCC_VERSION -b MakeFile -c debug -c profile -j0 -d
File renamed without changes.

Changelog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
06-Apr-2019 Fixes #527. Added VisualStudio 2019 support.
2+
- Added package VisualC-16 (note, no .0 suffix now, since it is intended to support all minor releases)
3+
- AppVeyor CI updated to test against the latest VisualStudio 2019 support they provide
4+
- Add new command line option, --VisualC.discoverprereleases, which allows vswhere to inspect prerelease editions too.
5+
- Updated vswhere NuGet to version 2.6.7.
6+
- Updated tests package definitions to include VisualC-16.
7+
- Various fixes to scripts to support VisualStudio 2019.
8+
19
03-Apr-2019 Fixes #526. Downloading and extracting package source archives now requires that a Module from the Package has been used in the build. This means that there may be packages with source archives that don't get downloaded on some platforms.
210

311
09-Mar-2019 Fixes #525. Resolving a package, when there is both an unversioned and (many) versioned candidates no longer fails with a null dereference. I believe this is a rare situation - usually all candidates for a package will be versioned when there is more than one.

codingtools/add_new_dependent_to_tests.py

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,27 @@
22

33
from optparse import OptionParser
44
import os
5+
import platform
56
import subprocess
67
import sys
78

9+
system = platform.system()
10+
if system == 'Windows':
11+
bam_shell = 'bam.bat'
12+
else:
13+
bam_shell = 'bam'
14+
15+
16+
def _log(message):
17+
print >>sys.stdout, message
18+
sys.stdout.flush()
19+
820

921
def get_bam_installdir():
10-
args = ['bam', '--installdir']
11-
install_dir = subprocess.check_output(args)
12-
return install_dir
22+
try:
23+
return subprocess.check_output([bam_shell, '--installdir']).rstrip()
24+
except WindowsError:
25+
raise RuntimeError('Unable to locate BAM on the PATH')
1326

1427

1528
def get_bam_rootdir():
@@ -27,10 +40,9 @@ def get_bam_testsdir():
2740
def add_dependent(package_dir, name, version):
2841
current_dir = os.getcwd()
2942
try:
30-
print >>sys.stdout, "Updating '%s'" % package_dir
31-
sys.stdout.flush()
43+
_log("Updating '%s'" % package_dir)
3244
os.chdir(package_dir)
33-
args = ['bam', '--adddependent', '--pkgname=%s' % name]
45+
args = [bam_shell, '--adddependent', '--pkgname=%s' % name]
3446
if version:
3547
args.append('--pkgversion=%s' % version)
3648
process = subprocess.Popen(args)
@@ -54,4 +66,3 @@ def process_path(tests_dir, name, version):
5466
parser.error('Package name is required')
5567
tests_dir = get_bam_testsdir()
5668
process_path(tests_dir, options.name, options.version)
57-

packages/C/bam/Scripts/Options/DiscoverAllToolchains.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace C.Options
3232
public sealed class DiscoverAllToolchains :
3333
Bam.Core.IBooleanCommandLineArgument
3434
{
35-
string Bam.Core.ICommandLineArgument.ContextHelp => "All all toolchains to be discovered (no platform filtering)";
35+
string Bam.Core.ICommandLineArgument.ContextHelp => "Allow all toolchains to be discovered (no platform filtering)";
3636
string Bam.Core.ICommandLineArgument.LongName => "--C.discoveralltoolchains";
3737
string Bam.Core.ICommandLineArgument.ShortName => null;
3838
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#region License
2+
// Copyright (c) 2010-2019, Mark Final
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
//
8+
// * Redistributions of source code must retain the above copyright notice, this
9+
// list of conditions and the following disclaimer.
10+
//
11+
// * Redistributions in binary form must reproduce the above copyright notice,
12+
// this list of conditions and the following disclaimer in the documentation
13+
// and/or other materials provided with the distribution.
14+
//
15+
// * Neither the name of BuildAMation nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
18+
//
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#endregion // License
30+
namespace VisualC
31+
{
32+
public sealed class ArchiverSettings :
33+
VisualCCommon.CommonArchiverSettings
34+
{
35+
public ArchiverSettings(
36+
Bam.Core.Module module)
37+
:
38+
base(module)
39+
{ }
40+
}
41+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#region License
2+
// Copyright (c) 2010-2019, Mark Final
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
//
8+
// * Redistributions of source code must retain the above copyright notice, this
9+
// list of conditions and the following disclaimer.
10+
//
11+
// * Redistributions in binary form must reproduce the above copyright notice,
12+
// this list of conditions and the following disclaimer in the documentation
13+
// and/or other materials provided with the distribution.
14+
//
15+
// * Neither the name of BuildAMation nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
18+
//
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#endregion // License
30+
namespace VisualC
31+
{
32+
public sealed class AssemblerSettings :
33+
VisualCCommon.CommonAssemblerSettings
34+
{
35+
public AssemblerSettings(
36+
Bam.Core.Module module)
37+
:
38+
base(module)
39+
{ }
40+
}
41+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#region License
2+
// Copyright (c) 2010-2019, Mark Final
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
//
8+
// * Redistributions of source code must retain the above copyright notice, this
9+
// list of conditions and the following disclaimer.
10+
//
11+
// * Redistributions in binary form must reproduce the above copyright notice,
12+
// this list of conditions and the following disclaimer in the documentation
13+
// and/or other materials provided with the distribution.
14+
//
15+
// * Neither the name of BuildAMation nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
18+
//
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#endregion // License
30+
namespace VisualC
31+
{
32+
public sealed class CCompilerSettings :
33+
VisualCCommon.CommonCCompilerSettings
34+
{
35+
public CCompilerSettings(
36+
Bam.Core.Module module)
37+
:
38+
base(module)
39+
{ }
40+
41+
public CCompilerSettings(
42+
Bam.Core.Module module,
43+
bool useDefaults)
44+
:
45+
base(module, useDefaults)
46+
{ }
47+
}
48+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#region License
2+
// Copyright (c) 2010-2019, Mark Final
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
//
8+
// * Redistributions of source code must retain the above copyright notice, this
9+
// list of conditions and the following disclaimer.
10+
//
11+
// * Redistributions in binary form must reproduce the above copyright notice,
12+
// this list of conditions and the following disclaimer in the documentation
13+
// and/or other materials provided with the distribution.
14+
//
15+
// * Neither the name of BuildAMation nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
18+
//
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#endregion // License
30+
namespace VisualC
31+
{
32+
public sealed class CxxCompilerSettings :
33+
VisualCCommon.CommonCxxCompilerSettings,
34+
C.ICxxOnlyCompilerSettings
35+
{
36+
public CxxCompilerSettings(
37+
Bam.Core.Module module)
38+
:
39+
base(module, true)
40+
{ }
41+
42+
public CxxCompilerSettings(
43+
Bam.Core.Module module,
44+
bool useDefaults)
45+
:
46+
base(module, useDefaults)
47+
{ }
48+
}
49+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#region License
2+
// Copyright (c) 2010-2019, Mark Final
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are met:
7+
//
8+
// * Redistributions of source code must retain the above copyright notice, this
9+
// list of conditions and the following disclaimer.
10+
//
11+
// * Redistributions in binary form must reproduce the above copyright notice,
12+
// this list of conditions and the following disclaimer in the documentation
13+
// and/or other materials provided with the distribution.
14+
//
15+
// * Neither the name of BuildAMation nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
18+
//
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#endregion // License
30+
namespace VisualC
31+
{
32+
public sealed class LinkerSettings :
33+
VisualCCommon.CommonLinkerSettings
34+
{
35+
public LinkerSettings(
36+
Bam.Core.Module module)
37+
:
38+
base(module)
39+
{ }
40+
}
41+
}

0 commit comments

Comments
 (0)