Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cppdialect/cdialect and some other opts #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

p0358
Copy link
Contributor

@p0358 p0358 commented Jul 4, 2023

Basically equivalent of this code when using Makefile: https://github.com/premake/premake-core/blob/3df1efce5e7c4399eb50f042c2a386ccde64ab62/modules/vstudio/vs2010_vcxproj.lua#L1628-L1658

Finding the piece of code linked above gives me some peace of mind that there aren't many other compile options that are missed anymore (those here are missing, because they'd normally go as solution param with MSBuild...)

Also btw I'll be adding tests to my changes after I'm done wit all my PRs, which is after my msbuild project compiles with this thing as well...

Copy link
Collaborator

@Jarod42 Jarod42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that PR could be closed. issue should be fixed in premake-core instead.
(and other generators (Codelite/Code::Blocks currently) would benefit from that).

@@ -232,6 +232,19 @@ local function getcflags(toolset, cfg, filecfg)
local includes = ninja.list(toolset.getincludedirs(cfg, filecfg.includedirs, filecfg.externalincludedirs, filecfg.frameworkdirs, filecfg.includedirsafter))
local forceincludes = ninja.list(toolset.getforceincludes(cfg))

local extra = ""
if toolset == p.tools.msc then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be in premake-ninja but in premake core in msc.lua
I already create premake/premake-core#2081 which should fix c(pp)dialect

extra = extra .. " /openmp"
end
end

return buildopt .. cppflags .. cflags .. defines .. includes .. forceincludes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, missing extra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants