Skip to content

Commit

Permalink
Auto-detect .NET target framework to use in build.sh (#1864)
Browse files Browse the repository at this point in the history
* Auto-detect .NET target framework to use in `build.sh`.

* Remove some unused build code and files.
  • Loading branch information
tritao authored Sep 1, 2024
1 parent 345de8b commit bf03942
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 181 deletions.
12 changes: 12 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ generate()
{
download_llvm


if [ "$target_framework" = "" ]; then
if command -v dotnet &> /dev/null
then
version=$(dotnet --version)
major_minor=$(echo $version | awk -F. '{print $1"."$2}')
target_framework="net$major_minor"
else
echo ".NET is not installed, cannot lookup up target framework version."
fi
fi

if [ "$os" = "linux" ] || [ "$os" = "macosx" ]; then
"$builddir/premake.sh" --file="$builddir/premake5.lua" gmake2 --os=$os --arch=$platform --configuration=$configuration --target-framework=$target_framework "$@"
fi
Expand Down
1 change: 0 additions & 1 deletion build/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ workspace "CppSharp"
if EnabledManagedProjects() then
include (srcdir .. "/Core")
include (srcdir .. "/AST")
--include (srcdir .. "/ASTViewer")
include (srcdir .. "/CppParser/Bindings")
include (srcdir .. "/CppParser/Bootstrap")
include (srcdir .. "/CppParser/ParserGen")
Expand Down
19 changes: 0 additions & 19 deletions build/scripts/ClangToolset.cmake

This file was deleted.

117 changes: 0 additions & 117 deletions build/scripts/Provision.lua

This file was deleted.

44 changes: 0 additions & 44 deletions build/scripts/Vagrantfile

This file was deleted.

0 comments on commit bf03942

Please sign in to comment.