diff --git a/.gitignore b/.gitignore index d6b32765..812ee05c 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ src/generator/generator *.filters *.sln *.metagen -*.csproj *.ilk *.manifest *.tmp @@ -43,6 +42,7 @@ src/generator/generator /build/vs20* /build/gmake /build/headers +/build/config.props /build/premake/premake5* /build/gen /deps/llvm diff --git a/Directory.Build.props b/Directory.Build.props index 26727916..36f0f2bb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,36 @@ + + $(MSBuildThisFileDirectory) x86;x64 false - $(RootDir)build\obj\$(MSBuildProjectName)\ - $(RootDir)bin\$(Configuration)_$(Platform) + $(RootDir)build\ + $(BuildDir)obj\ + $(BuildDir)gen\ + $(RootDir)src\ + $(ObjDir)$(MSBuildProjectName)\ + $(RootDir)bin\ + $(BaseOutputPath)$(Configuration)_$(PlatformTarget)\ + $(BuildDir)$(PremakeAction)\ + $(ActionDir)projects\ + $(OutputPath) 7.3 + 4 + dotnet + dll + "$(MSBuildProgramFiles32)\dotnet\dotnet.exe" + "$(ProgramW6432)\dotnet\dotnet.exe" + + + + true + full + false + + + + exe + \ No newline at end of file diff --git a/build/Helpers.lua b/build/Helpers.lua index 2b47b9aa..84e9337e 100644 --- a/build/Helpers.lua +++ b/build/Helpers.lua @@ -56,6 +56,7 @@ msvc_cpp_defines = { } default_gcc_version = "9.0.0" generate_build_config = true premake.path = premake.path .. ";" .. path.join(builddir, "modules") +targetframework = "netcoreapp3.1" function string.starts(str, start) if str == nil then return end @@ -73,6 +74,10 @@ end function SetupNativeProject() location (path.join(actionbuilddir, "projects")) files { "*.lua" } + + if os.getenv("CPPSHARP_RELEASE") == "true" then + symbols "off" + end filter { "configurations:Debug" } defines { "DEBUG" } @@ -118,11 +123,17 @@ function SetupNativeProject() end function SetupManagedProject() + kind "SharedLib" language "C#" location "." filter {} end +function SetupExternalManagedProject(name) + externalproject (name) + SetupManagedProject() +end + function IncludeDir(dir) local deps = os.matchdirs(dir .. "/*") @@ -230,3 +241,30 @@ function AddPlatformSpecificFiles(folder, filename) print "Unknown architecture" end end + +function WriteConfigForMSBuild() + local file = io.open("config.props", "w+") + function writeProperty(name, value) + file:write(" <" .. name .. ">" .. (value ~= nil and value or "") .. "\n") + end + function writeBooleanProperty(name, value) + writeProperty(name, value and "true" or "false") + end + + file:write("\n") + file:write("\n") + file:write(" \n") + writeProperty("PlatformTarget", target_architecture()) + writeProperty("TargetFramework", targetframework) + writeProperty("Configuration", _OPTIONS["configuration"]) + writeBooleanProperty("IsWindows", os.istarget("windows")) + writeBooleanProperty("IsLinux", os.istarget("linux")) + writeBooleanProperty("IsMacOSX", os.istarget("macosx")) + writeBooleanProperty("CI", os.getenv("CI") == "true") + writeBooleanProperty("GenerateBuildConfig", generate_build_config == true) + writeBooleanProperty("UseCXX11ABI", UseCxx11ABI()) + writeProperty("PremakeAction", _ACTION) + file:write(" \n") + file:write("") + file:close() +end diff --git a/build/Tests.lua b/build/Tests.lua index e4235e90..148e64c9 100644 --- a/build/Tests.lua +++ b/build/Tests.lua @@ -40,32 +40,15 @@ function SetupManagedTestProject() files { "*.lua" } end -function SetupTestGeneratorProject(name, depends) - if not EnabledManagedProjects() then - return - end - project(name .. ".Gen") - SetupManagedTestProject() - kind "ConsoleApp" - enabledefaultnoneitems "false" - - files { name .. ".cs" } - dependson { name .. ".Native" } - links { "CppSharp.Generator.Tests" } - - if depends ~= nil then - links { depends .. ".Gen" } - end - - local command = os.ishost("windows") and "type nul >" or "touch" - postbuildcommands { command .. " " .. SafePath(path.join(objsdir, name .. ".Native", "timestamp.cs")) } - postbuildcommands { command .. " " .. SafePath(path.join(objsdir, name .. ".Native", "timestamp.cpp")) } +function SetupExternalManagedTestProject(name) + externalproject (name) + SetupManagedTestProject() end -function SetupTestGeneratorBuildEvent(name) - local cmd = os.ishost("windows") and "" or "dotnet " - local ext = os.ishost("windows") and "exe" or "dll" - prebuildcommands { cmd .. SafePath(path.join("%{cfg.buildtarget.directory}", name .. ".Gen." .. ext)) } +function SetupTestGeneratorProject(name, depends) + if EnabledManagedProjects() then + SetupExternalManagedTestProject(name .. ".Gen") + end end function SetupTestNativeProject(name, depends) @@ -86,10 +69,6 @@ function SetupTestNativeProject(name, depends) if depends ~= nil then links { depends .. ".Native" } end - - local command = os.ishost("windows") and "type nul >" or "touch" - postbuildcommands { command .. " " .. SafePath(path.join(objsdir, name .. ".Native", "timestamp.cs")) } - postbuildcommands { command .. " " .. SafePath(path.join(objsdir, name .. ".Native", "timestamp.cpp")) } end function SetupTestProjectsCSharp(name, depends, extraFiles, suffix) @@ -103,35 +82,9 @@ function SetupTestProjectsCSharp(name, depends, extraFiles, suffix) nm = name str = "Std" end - project(name .. ".CSharp") - SetupManagedTestProject() - - dependson { name .. ".Gen", name .. ".Native", "CppSharp.Generator" } - SetupTestGeneratorBuildEvent(name) - enabledefaultnoneitems "false" - - files - { - path.join(gendir, name, nm .. ".cs"), - path.join(gendir, name, str .. ".cs"), - path.join(objsdir, name .. ".Native", "timestamp.cs") - } - - links { "CppSharp.Runtime" } - - if depends ~= nil then - links { depends .. ".CSharp" } - end - - project(name .. ".Tests.CSharp") - SetupManagedTestProject() - - enabledefaultnoneitems "false" - files { name .. ".Tests.cs" } - - links { name .. ".CSharp", "CppSharp.Generator.Tests", "CppSharp.Runtime" } - nuget { "Microsoft.NET.Test.Sdk:16.8.0" } - dependson { name .. ".Native" } + + SetupExternalManagedTestProject(name .. ".CSharp") + SetupExternalManagedTestProject(name .. ".Tests.CSharp") end function SetupTestProjectsCLI(name, extraFiles, suffix) @@ -142,14 +95,11 @@ function SetupTestProjectsCLI(name, extraFiles, suffix) project(name .. ".CLI") SetupNativeProject() - enabledefaultcompileitems "false" - enabledefaultnoneitems "false" kind "SharedLib" language "C++" clr "NetCore" - dependson { name .. ".Gen", name .. ".Native", "CppSharp.Generator" } - SetupTestGeneratorBuildEvent(name) + dependson { name .. ".Gen" } if (suffix ~= nil) then nm = name .. suffix @@ -174,16 +124,9 @@ function SetupTestProjectsCLI(name, extraFiles, suffix) includedirs { path.join(testsdir, name), incdir } links { name .. ".Native" } - files { path.join(objsdir, name .. ".Native", "timestamp.cpp") } - - project(name .. ".Tests.CLI") - SetupManagedTestProject() - enabledefaultnoneitems "false" - files { name .. ".Tests.cs" } + files { path.join(objsdir, name .. ".Native") } - links { name .. ".CLI", "CppSharp.Generator.Tests" } - dependson { name .. ".Native" } - nuget { "Microsoft.NET.Test.Sdk:16.8.0" } + SetupExternalManagedTestProject(name .. ".Tests.CLI") end function IncludeExamples() diff --git a/build/build.sh b/build/build.sh index 28b6080d..f414f65d 100755 --- a/build/build.sh +++ b/build/build.sh @@ -140,7 +140,7 @@ find_msbuild() if [ -x "$(command -v MSBuild.exe)" ]; then msbuild="MSBuild.exe" else - msbuild="msbuild" + msbuild="dotnet msbuild" fi } diff --git a/build/premake/premake.extensions.lua b/build/premake/premake.extensions.lua index fa917b01..40107380 100644 --- a/build/premake/premake.extensions.lua +++ b/build/premake/premake.extensions.lua @@ -4,44 +4,16 @@ premake.api.register { kind = "list:string", } -premake.api.register { - name = "removecompilefiles", - scope = "project", - kind = "list:string", -} - -premake.api.register { - name = "enabledefaultnoneitems", - scope = "project", - kind = "boolean", -} - -premake.override(premake.vstudio.dotnetbase.netcore, "enableDefaultCompileItems", function(base, cfg) - base(cfg); - - if cfg.enabledefaultnoneitems ~= nil then - premake.w('%s', iif(cfg.enabledefaultnoneitems, "true", "false")) - end -end) - -premake.override(premake.vstudio.dotnetbase, "files", function(base, prj) - base(prj); - - if prj.removecompilefiles ~= nil then - for _, file in ipairs(prj.removecompilefiles) do - premake.w("", file) - end - end -end) - -- https://github.com/premake/premake-core/issues/1061#issuecomment-441417853 premake.override(premake.vstudio.sln2005, "projects", function(base, wks) if wks.workspacefiles and #wks.workspacefiles > 0 then premake.push('Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{' .. os.uuid("Solution Items:"..wks.name) .. '}"') premake.push("ProjectSection(SolutionItems) = preProject") - for _, file in ipairs(wks.workspacefiles) do - file = path.rebase(file, ".", wks.location) - premake.w(file.." = "..file) + for _, pattern in ipairs(wks.workspacefiles) do + local matches = os.matchfiles(pattern) + for _, file in ipairs(matches) do + premake.w(file.." = "..file) + end end premake.pop("EndProjectSection") premake.pop("EndProject") diff --git a/build/premake/premake.fixes.lua b/build/premake/premake.fixes.lua index 9af453d3..843d43f3 100644 --- a/build/premake/premake.fixes.lua +++ b/build/premake/premake.fixes.lua @@ -10,14 +10,3 @@ premake.override(premake.vstudio.vc2010, "targetFramework", function(oldfn, prj) oldfn(prj) end end) - --- https://github.com/premake/premake-core/issues/1549 -premake.override(premake.vstudio.cs2005.elements, "projectProperties", function(base, cfg) - local calls = base(cfg); - table.insert(calls, function(cfg) - if cfg.clr == "Unsafe" then - premake.w('true') - end - end) - return calls; -end) diff --git a/build/premake5.lua b/build/premake5.lua index 4e7b8145..99cb5e07 100644 --- a/build/premake5.lua +++ b/build/premake5.lua @@ -8,10 +8,9 @@ include "Helpers.lua" include "LLVM.lua" workspace "CppSharp" - configurations { _OPTIONS["configuration"] } platforms { target_architecture() } - dotnetframework "netcoreapp3.1" + dotnetframework (targetframework) enabledefaultcompileitems "true" characterset "Unicode" symbols "On" @@ -35,6 +34,11 @@ workspace "CppSharp" end end + workspacefiles(path.join(builddir, "premake5.lua")) + workspacefiles(path.join(builddir, "*.sh")) + workspacefiles(path.join(rootdir, "tests/Test*.props")) + WriteConfigForMSBuild() + group "Libraries" if EnableNativeProjects() then include (srcdir .. "/CppParser") diff --git a/src/AST/CppSharp.AST.csproj b/src/AST/CppSharp.AST.csproj new file mode 100644 index 00000000..4c37eea3 --- /dev/null +++ b/src/AST/CppSharp.AST.csproj @@ -0,0 +1,6 @@ + + + netstandard2.1 + AnyCPU + + \ No newline at end of file diff --git a/src/AST/premake5.lua b/src/AST/premake5.lua index 0ceb88be..cc89135b 100644 --- a/src/AST/premake5.lua +++ b/src/AST/premake5.lua @@ -1,6 +1 @@ -project "CppSharp.AST" - - kind "SharedLib" - language "C#" - - SetupManagedProject() +SetupExternalManagedProject("CppSharp.AST") diff --git a/src/CLI/CppSharp.CLI.csproj b/src/CLI/CppSharp.CLI.csproj new file mode 100644 index 00000000..4a529cbc --- /dev/null +++ b/src/CLI/CppSharp.CLI.csproj @@ -0,0 +1,9 @@ + + + Exe + + + + + + \ No newline at end of file diff --git a/src/CLI/premake5.lua b/src/CLI/premake5.lua index 5343ffb7..f4b3cdfb 100644 --- a/src/CLI/premake5.lua +++ b/src/CLI/premake5.lua @@ -1,8 +1 @@ -project "CppSharp.CLI" - - SetupManagedProject() - - kind "ConsoleApp" - language "C#" - - links { "CppSharp.Generator" } +SetupExternalManagedProject("CppSharp.CLI") diff --git a/src/Core/CppSharp.csproj b/src/Core/CppSharp.csproj new file mode 100644 index 00000000..9b75088f --- /dev/null +++ b/src/Core/CppSharp.csproj @@ -0,0 +1,11 @@ + + + netstandard2.1 + AnyCPU + + + + + + + \ No newline at end of file diff --git a/src/Core/premake5.lua b/src/Core/premake5.lua index 69add26b..b40b7e3e 100644 --- a/src/Core/premake5.lua +++ b/src/Core/premake5.lua @@ -1,11 +1 @@ -project "CppSharp" - - SetupManagedProject() - - kind "SharedLib" - language "C#" - - nuget { - "Microsoft.Win32.Registry:4.7.0", - "Microsoft.VisualStudio.Setup.Configuration.Interop:2.3.2262-g94fae01e" - } +SetupExternalManagedProject("CppSharp") diff --git a/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj b/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj new file mode 100644 index 00000000..3398b576 --- /dev/null +++ b/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj @@ -0,0 +1,23 @@ + + + false + false + true + x86_64-pc-win32-msvc + x86_64-linux-gnu-cxx11abi + x86_64-linux-gnu + x86_64-apple-darwin12.4.0 + i686-pc-win32-msvc + i686-apple-darwin12.4.0 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/CppParser/Bindings/CSharp/premake5.lua b/src/CppParser/Bindings/CSharp/premake5.lua index fe159d25..1aae3454 100644 --- a/src/CppParser/Bindings/CSharp/premake5.lua +++ b/src/CppParser/Bindings/CSharp/premake5.lua @@ -2,19 +2,6 @@ if not EnabledManagedProjects() then return end -project "CppSharp.Parser.CSharp" - SetupManagedProject() - - kind "SharedLib" - language "C#" - clr "Unsafe" - enabledefaultcompileitems "false" - enabledefaultnoneitems "false" - - dependson { "CppSharp.CppParser" } - links { "CppSharp.Runtime" } - - AddPlatformSpecificFiles("", "**.cs") - AddPlatformSpecificFiles("", "**.cpp") +SetupExternalManagedProject("CppSharp.Parser.CSharp") CppSharpParserBindings = "CppSharp.Parser.CSharp" diff --git a/src/CppParser/Bootstrap/CppSharp.Parser.Bootstrap.csproj b/src/CppParser/Bootstrap/CppSharp.Parser.Bootstrap.csproj new file mode 100644 index 00000000..6bc7a6cc --- /dev/null +++ b/src/CppParser/Bootstrap/CppSharp.Parser.Bootstrap.csproj @@ -0,0 +1,9 @@ + + + Exe + + + + + + \ No newline at end of file diff --git a/src/CppParser/Bootstrap/premake5.lua b/src/CppParser/Bootstrap/premake5.lua index ea7804b3..a4e670d0 100644 --- a/src/CppParser/Bootstrap/premake5.lua +++ b/src/CppParser/Bootstrap/premake5.lua @@ -1,9 +1 @@ -project "CppSharp.Parser.Bootstrap" - - SetupManagedProject() - - kind "ConsoleApp" - language "C#" - debugdir "." - - links { "CppSharp.Generator" } +SetupExternalManagedProject("CppSharp.Parser.Bootstrap") diff --git a/src/CppParser/ParserGen/CppSharp.Parser.Gen.csproj b/src/CppParser/ParserGen/CppSharp.Parser.Gen.csproj new file mode 100644 index 00000000..6bc7a6cc --- /dev/null +++ b/src/CppParser/ParserGen/CppSharp.Parser.Gen.csproj @@ -0,0 +1,9 @@ + + + Exe + + + + + + \ No newline at end of file diff --git a/src/CppParser/ParserGen/premake5.lua b/src/CppParser/ParserGen/premake5.lua index fbf08104..115cb628 100644 --- a/src/CppParser/ParserGen/premake5.lua +++ b/src/CppParser/ParserGen/premake5.lua @@ -1,9 +1 @@ -project "CppSharp.Parser.Gen" - - SetupManagedProject() - - kind "ConsoleApp" - language "C#" - debugdir "." - - links { "CppSharp.Generator" } +SetupExternalManagedProject("CppSharp.Parser.Gen") \ No newline at end of file diff --git a/src/Generator.Tests/CppSharp.Generator.Tests.csproj b/src/Generator.Tests/CppSharp.Generator.Tests.csproj new file mode 100644 index 00000000..fc17f50f --- /dev/null +++ b/src/Generator.Tests/CppSharp.Generator.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Generator.Tests/premake5.lua b/src/Generator.Tests/premake5.lua index 0566f235..db45442a 100644 --- a/src/Generator.Tests/premake5.lua +++ b/src/Generator.Tests/premake5.lua @@ -1,20 +1 @@ -project "CppSharp.Generator.Tests" - - kind "SharedLib" - SetupManagedProject() - - files { testsdir .. "/Native/AST.h", testsdir .. "/Native/ASTExtensions.h", testsdir .. "/Native/Passes.h" } - filter "files:**.h" - buildaction "None" - filter {} - - links { "CppSharp.Generator" } - - nuget - { - "System.CodeDom:4.7.0", - "Microsoft.CSharp:4.7.0", - "Microsoft.NET.Test.Sdk:16.8.0", - "NUnit:3.11.0", - "NUnit3TestAdapter:3.17.0", - } \ No newline at end of file +SetupExternalManagedProject("CppSharp.Generator.Tests") \ No newline at end of file diff --git a/src/Generator/CppSharp.Generator.csproj b/src/Generator/CppSharp.Generator.csproj new file mode 100644 index 00000000..49500e3d --- /dev/null +++ b/src/Generator/CppSharp.Generator.csproj @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Generator/premake5.lua b/src/Generator/premake5.lua index d94be49e..625eddb0 100644 --- a/src/Generator/premake5.lua +++ b/src/Generator/premake5.lua @@ -1,20 +1 @@ -project "CppSharp.Generator" - - SetupManagedProject() - - kind "SharedLib" - language "C#" - dependson { "Std-symbols" } - links { "CppSharp.Parser" } - - nuget - { - "System.CodeDom:4.7.0", - "Microsoft.CSharp:4.7.0" - } - - files { "**verbs.txt" } - filter { 'files:**verbs.txt' } - buildaction "Embed" - - filter {} \ No newline at end of file +SetupExternalManagedProject("CppSharp.Generator") \ No newline at end of file diff --git a/src/Parser/CppSharp.Parser.csproj b/src/Parser/CppSharp.Parser.csproj new file mode 100644 index 00000000..a8744e3b --- /dev/null +++ b/src/Parser/CppSharp.Parser.csproj @@ -0,0 +1,18 @@ + + + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Parser/premake5.lua b/src/Parser/premake5.lua index 71ac4503..c956a7b7 100644 --- a/src/Parser/premake5.lua +++ b/src/Parser/premake5.lua @@ -15,23 +15,4 @@ if generate_build_config == true and _ACTION then GenerateBuildConfig() end -project "CppSharp.Parser" - - SetupManagedProject() - - kind "SharedLib" - language "C#" - clr "Unsafe" - - if generate_build_config == true then - files { buildconfig } - removecompilefiles { "BuildConfig.cs" } - end - - links - { - "CppSharp", - "CppSharp.AST", - "CppSharp.Runtime", - CppSharpParserBindings - } +SetupExternalManagedProject("CppSharp.Parser") diff --git a/src/Runtime/CppSharp.Runtime.csproj b/src/Runtime/CppSharp.Runtime.csproj new file mode 100644 index 00000000..0f518952 --- /dev/null +++ b/src/Runtime/CppSharp.Runtime.csproj @@ -0,0 +1,7 @@ + + + true + netstandard2.0 + AnyCPU + + \ No newline at end of file diff --git a/src/Runtime/premake5.lua b/src/Runtime/premake5.lua index 29629d67..392a6633 100644 --- a/src/Runtime/premake5.lua +++ b/src/Runtime/premake5.lua @@ -1,12 +1,2 @@ -project "CppSharp.Runtime" +SetupExternalManagedProject("CppSharp.Runtime") - SetupManagedProject() - - kind "SharedLib" - clr "Unsafe" - - filter { "toolset:msc*" } - defines { "MSVC" } - - filter { "system:macosx" } - defines { "LIBCXX" } diff --git a/tests/CLI/CLI.Gen.csproj b/tests/CLI/CLI.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/CLI/CLI.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/CLI/CLI.Tests.CLI.csproj b/tests/CLI/CLI.Tests.CLI.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/CLI/CLI.Tests.CLI.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/CSharp/CSharp.CSharp.csproj b/tests/CSharp/CSharp.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/CSharp/CSharp.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/CSharp/CSharp.Gen.csproj b/tests/CSharp/CSharp.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/CSharp/CSharp.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/CSharp/CSharp.Tests.CSharp.csproj b/tests/CSharp/CSharp.Tests.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/CSharp/CSharp.Tests.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Common/Common.CSharp.csproj b/tests/Common/Common.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Common/Common.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Common/Common.Gen.csproj b/tests/Common/Common.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Common/Common.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Common/Common.Tests.CLI.csproj b/tests/Common/Common.Tests.CLI.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Common/Common.Tests.CLI.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Common/Common.Tests.CSharp.csproj b/tests/Common/Common.Tests.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Common/Common.Tests.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props new file mode 100644 index 00000000..9b32f3ec --- /dev/null +++ b/tests/Directory.Build.props @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tests/Encodings/Encodings.CSharp.csproj b/tests/Encodings/Encodings.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Encodings/Encodings.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Encodings/Encodings.Gen.csproj b/tests/Encodings/Encodings.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Encodings/Encodings.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Encodings/Encodings.Tests.CSharp.csproj b/tests/Encodings/Encodings.Tests.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/Encodings/Encodings.Tests.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/NamespacesBase/NamespacesBase.CSharp.csproj b/tests/NamespacesBase/NamespacesBase.CSharp.csproj new file mode 100644 index 00000000..2a304a1d --- /dev/null +++ b/tests/NamespacesBase/NamespacesBase.CSharp.csproj @@ -0,0 +1,11 @@ + + + NamespacesDerived.Gen + $(MSBuildProjectDirectory)\..\NamespacesDerived\ + false + + + + + + \ No newline at end of file diff --git a/tests/NamespacesBase/premake4.lua b/tests/NamespacesBase/premake4.lua index f1840fbc..0a1ec95a 100644 --- a/tests/NamespacesBase/premake4.lua +++ b/tests/NamespacesBase/premake4.lua @@ -3,17 +3,7 @@ function SetupWrapper(name) return end - project(name .. ".CSharp") - SetupManagedTestProject() - - dependson { name .. ".Native", "NamespacesDerived.Gen" } - links { "CppSharp.Runtime" } - SetupTestGeneratorBuildEvent("NamespacesDerived") - - files - { - path.join(gendir, "NamespacesDerived", name .. ".cs"), - } + SetupExternalManagedTestProject(name .. ".CSharp") end group "Tests/Namespaces" diff --git a/tests/NamespacesDerived/NamespacesDerived.CSharp.csproj b/tests/NamespacesDerived/NamespacesDerived.CSharp.csproj new file mode 100644 index 00000000..c76d0ed6 --- /dev/null +++ b/tests/NamespacesDerived/NamespacesDerived.CSharp.csproj @@ -0,0 +1,14 @@ + + + false + + + + + + + + + + + \ No newline at end of file diff --git a/tests/NamespacesDerived/NamespacesDerived.Gen.csproj b/tests/NamespacesDerived/NamespacesDerived.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/NamespacesDerived/NamespacesDerived.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/NamespacesDerived/NamespacesDerived.Tests.CSharp.csproj b/tests/NamespacesDerived/NamespacesDerived.Tests.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/NamespacesDerived/NamespacesDerived.Tests.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/StandardLib/StandardLib.Gen.csproj b/tests/StandardLib/StandardLib.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/StandardLib/StandardLib.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/StandardLib/StandardLib.Tests.CLI.csproj b/tests/StandardLib/StandardLib.Tests.CLI.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/StandardLib/StandardLib.Tests.CLI.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/Test.Bindings.props b/tests/Test.Bindings.props new file mode 100644 index 00000000..2f4a3b1d --- /dev/null +++ b/tests/Test.Bindings.props @@ -0,0 +1,23 @@ + + + true + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/Test.Common.props b/tests/Test.Common.props new file mode 100644 index 00000000..dcb905b5 --- /dev/null +++ b/tests/Test.Common.props @@ -0,0 +1,20 @@ + + + true + false + false + false + false + false + true + true + true + $(MSBuildProjectName.Substring(0, $(MSBuildProjectName.IndexOf('.')))) + $(TestName).Gen + Exe + + + + + + \ No newline at end of file diff --git a/tests/Test.Generator.props b/tests/Test.Generator.props new file mode 100644 index 00000000..39a77ca8 --- /dev/null +++ b/tests/Test.Generator.props @@ -0,0 +1,31 @@ + + + $(BaseIntermediateOutputPath)$(TestName).Bindings.timestamp + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/Test.props b/tests/Test.props new file mode 100644 index 00000000..78e66b4c --- /dev/null +++ b/tests/Test.props @@ -0,0 +1,20 @@ + + + true + + + + + + + + + + + + + + + + + diff --git a/tests/VTables/VTables.CSharp.csproj b/tests/VTables/VTables.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/VTables/VTables.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/VTables/VTables.Gen.csproj b/tests/VTables/VTables.Gen.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/VTables/VTables.Gen.csproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/VTables/VTables.Tests.CSharp.csproj b/tests/VTables/VTables.Tests.CSharp.csproj new file mode 100644 index 00000000..a6968989 --- /dev/null +++ b/tests/VTables/VTables.Tests.CSharp.csproj @@ -0,0 +1 @@ + \ No newline at end of file