Browse Source

Adjust some compiler options (#1916)

pull/1917/head
Jelle 2 months ago committed by GitHub
parent
commit
ba751a5c7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      build/Helpers.lua
  2. 8
      build/Tests.lua
  3. 3
      src/CppParser/Bindings/CLI/premake5.lua

7
build/Helpers.lua

@ -63,7 +63,7 @@ actionbuilddir = path.join(builddir, _ACTION == "gmake2" and "gmake" or (_ACTION @@ -63,7 +63,7 @@ actionbuilddir = path.join(builddir, _ACTION == "gmake2" and "gmake" or (_ACTION
bindircfg = path.join(bindir, "%{cfg.buildcfg}");
prjobjdir = path.join(objsdir, "%{prj.name}", "%{cfg.buildcfg}")
msvc_buildflags = { "/MP", "/wd4267" }
msvc_buildflags = { "/wd4267" }
msvc_cpp_defines = { }
default_gcc_version = "9.0.0"
generate_build_config = true
@ -98,6 +98,9 @@ function SetupNativeProject() @@ -98,6 +98,9 @@ function SetupNativeProject()
location (path.join(actionbuilddir, "projects"))
files { "*.lua" }
cppdialect "c++17"
flags { "MultiProcessorCompile" }
justmycode "On"
functionlevellinking "On"
if os.getenv("CPPSHARP_RELEASE") == "true" then
symbols "off"
@ -110,6 +113,8 @@ function SetupNativeProject() @@ -110,6 +113,8 @@ function SetupNativeProject()
defines { "DEBUG" }
optimize "Debug"
runtime "Release"
intrinsics "On"
inlining "Explicit"
filter { "configurations:Release" }
defines { "NDEBUG" }

8
build/Tests.lua

@ -36,7 +36,7 @@ function SetupManagedTestProject() @@ -36,7 +36,7 @@ function SetupManagedTestProject()
enabledefaultcompileitems "false"
kind "SharedLib"
language "C#"
clr "Unsafe"
clr "NetCore"
files { "*.lua" }
end
@ -101,6 +101,12 @@ function SetupTestProjectsCLI(name, extraFiles, suffix) @@ -101,6 +101,12 @@ function SetupTestProjectsCLI(name, extraFiles, suffix)
kind "SharedLib"
language "C++"
clr "NetCore"
filter { "configurations:Debug*" }
assemblydebug "On"
filter {}
targetdir (path.join(gendir, name))
dependson { name .. ".Gen" }

3
src/CppParser/Bindings/CLI/premake5.lua

@ -9,6 +9,9 @@ project "CppSharp.Parser.CLI" @@ -9,6 +9,9 @@ project "CppSharp.Parser.CLI"
dependson { "CppSharp.CppParser" }
flags { common_flags }
clr "NetCore"
filter { "configurations:Debug*" }
assemblydebug "On"
filter "toolset:msc*"
buildoptions { clang_msvc_flags }

Loading…
Cancel
Save