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

Fix sysincludedirs for codelite. #1505

Merged
merged 2 commits into from
Aug 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions modules/codelite/codelite_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@
end

local toolset = m.getcompiler(cfg)
local sysincludedirs = toolset.getincludedirs(cfg, {}, cfg.sysincludedirs)
local forceincludes = toolset.getforceincludes(cfg)
local cxxflags = table.concat(table.join(toolset.getcxxflags(cfg), forceincludes, cfg.buildoptions), ";")
local cflags = table.concat(table.join(toolset.getcflags(cfg), forceincludes, cfg.buildoptions), ";")
local cxxflags = table.concat(table.join(sysincludedirs, toolset.getcxxflags(cfg), forceincludes, cfg.buildoptions), ";")
local cflags = table.concat(table.join(sysincludedirs, toolset.getcflags(cfg), forceincludes, cfg.buildoptions), ";")
local asmflags = ""
local pch = ""

Expand Down Expand Up @@ -241,7 +242,7 @@
local options = table.concat(cfg.resoptions, ";")

_x(3, '<ResourceCompiler Options="%s%s" Required="yes">', defines, options)
for _, includepath in ipairs(table.join(cfg.includedirs, cfg.resincludedirs)) do
for _, includepath in ipairs(table.join(cfg.sysincludedirs, cfg.includedirs, cfg.resincludedirs)) do
_x(4, '<IncludePath Value="%s"/>', project.getrelative(cfg.project, includepath))
end
_p(3, '</ResourceCompiler>')
Expand Down
9 changes: 7 additions & 2 deletions modules/codelite/tests/test_codelite_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@
end

function suite.OnProjectCfg_Includes()
sysincludedirs { "sysdir", "sysdir2/"}
samsinsane marked this conversation as resolved.
Show resolved Hide resolved
includedirs { "dir/", "dir2" }
prepare()
codelite.project.compiler(cfg)
test.capture [[
<Compiler Options="" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<Compiler Options="-isystem sysdir;-isystem sysdir2" C_Options="-isystem sysdir;-isystem sysdir2" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="dir"/>
<IncludePath Value="dir2"/>
</Compiler>
Expand Down Expand Up @@ -126,12 +127,16 @@

function suite.OnProjectCfg_ResInclude()
files { "x.rc" }
resincludedirs { "dir/" }
includedirs { "dir/" }
sysincludedirs { "sysdir/" }
samsinsane marked this conversation as resolved.
Show resolved Hide resolved
resincludedirs { "resdir/" }
prepare()
codelite.project.resourceCompiler(cfg)
test.capture [[
<ResourceCompiler Options="" Required="yes">
<IncludePath Value="sysdir"/>
<IncludePath Value="dir"/>
<IncludePath Value="resdir"/>
</ResourceCompiler>
]]
end
Expand Down