Skip to content

Commit bf03942

Browse files
authored
Auto-detect .NET target framework to use in build.sh (mono#1864)
* Auto-detect .NET target framework to use in `build.sh`. * Remove some unused build code and files.
1 parent 345de8b commit bf03942

File tree

5 files changed

+12
-181
lines changed

5 files changed

+12
-181
lines changed

build/build.sh

+12
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ generate()
5454
{
5555
download_llvm
5656

57+
58+
if [ "$target_framework" = "" ]; then
59+
if command -v dotnet &> /dev/null
60+
then
61+
version=$(dotnet --version)
62+
major_minor=$(echo $version | awk -F. '{print $1"."$2}')
63+
target_framework="net$major_minor"
64+
else
65+
echo ".NET is not installed, cannot lookup up target framework version."
66+
fi
67+
fi
68+
5769
if [ "$os" = "linux" ] || [ "$os" = "macosx" ]; then
5870
"$builddir/premake.sh" --file="$builddir/premake5.lua" gmake2 --os=$os --arch=$platform --configuration=$configuration --target-framework=$target_framework "$@"
5971
fi

build/premake5.lua

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ workspace "CppSharp"
5353
if EnabledManagedProjects() then
5454
include (srcdir .. "/Core")
5555
include (srcdir .. "/AST")
56-
--include (srcdir .. "/ASTViewer")
5756
include (srcdir .. "/CppParser/Bindings")
5857
include (srcdir .. "/CppParser/Bootstrap")
5958
include (srcdir .. "/CppParser/ParserGen")

build/scripts/ClangToolset.cmake

-19
This file was deleted.

build/scripts/Provision.lua

-117
This file was deleted.

build/scripts/Vagrantfile

-44
This file was deleted.

0 commit comments

Comments
 (0)