Merge pull request #1240 from WorldofBay/patch-1
allow linking of mixed c++ assemblies
This commit is contained in:
commit
a413f904d7
@ -99,6 +99,19 @@
|
||||
return false
|
||||
end
|
||||
|
||||
-- Can link mixed C++ with native projects
|
||||
|
||||
if cfg.language == "C++" then
|
||||
if cfg.clr == p.ON then
|
||||
return true
|
||||
end
|
||||
end
|
||||
if target.language == "C++" then
|
||||
if target.clr == p.ON then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
-- Can't link managed and unmanaged projects
|
||||
|
||||
local cfgManaged = project.isdotnet(cfg.project) or (cfg.clr ~= p.OFF)
|
||||
|
@ -192,3 +192,33 @@
|
||||
local r = prepare("all", "fullpath")
|
||||
test.isequal({}, r)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Mixed and unmanaged projects can link to each other.
|
||||
--
|
||||
|
||||
|
||||
function suite.canLink_MixedAndNativeCpp()
|
||||
clr "On"
|
||||
links { "MyProject2" }
|
||||
|
||||
project "MyProject2"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
|
||||
local r = prepare("all", "fullpath")
|
||||
test.isequal({ "bin/Debug/MyProject2.lib" }, r)
|
||||
end
|
||||
|
||||
function suite.canLink_NativeAndMixedCpp()
|
||||
links { "MyProject2" }
|
||||
|
||||
project "MyProject2"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
clr "On"
|
||||
|
||||
local r = prepare("all", "fullpath")
|
||||
test.isequal({ "bin/Debug/MyProject2.lib" }, r)
|
||||
end
|
||||
|
Reference in New Issue
Block a user