Merge pull request #332 from starkos/rollback-pr247
Rollback PR #247 - support framework folders in gcc/clang
This commit is contained in:
commit
cfec692c4c
@ -248,19 +248,11 @@
|
|||||||
local flags = config.mapFlags(cfg, gcc.libraryDirectories)
|
local flags = config.mapFlags(cfg, gcc.libraryDirectories)
|
||||||
|
|
||||||
-- Scan the list of linked libraries. If any are referenced with
|
-- Scan the list of linked libraries. If any are referenced with
|
||||||
-- paths, add those to the list of library search paths
|
-- paths, add those to the list of library search paths. The call
|
||||||
local done = {}
|
-- config.getlinks() all includes cfg.libdirs.
|
||||||
for _, link in ipairs(config.getlinks(cfg, "system", "fullpath")) do
|
for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do
|
||||||
local dir = path.getdirectory(link)
|
|
||||||
if #dir > 1 and not done[dir] then
|
|
||||||
done[dir] = true
|
|
||||||
if path.isframework(link) then
|
|
||||||
table.insert(flags, '-F' .. premake.quoted(dir))
|
|
||||||
else
|
|
||||||
table.insert(flags, '-L' .. premake.quoted(dir))
|
table.insert(flags, '-L' .. premake.quoted(dir))
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if cfg.flags.RelativeLinks then
|
if cfg.flags.RelativeLinks then
|
||||||
for _, dir in ipairs(config.getlinks(cfg, "siblings", "directory")) do
|
for _, dir in ipairs(config.getlinks(cfg, "siblings", "directory")) do
|
||||||
|
@ -147,6 +147,7 @@ return {
|
|||||||
"actions/make/cpp/test_clang.lua",
|
"actions/make/cpp/test_clang.lua",
|
||||||
"actions/make/cpp/test_file_rules.lua",
|
"actions/make/cpp/test_file_rules.lua",
|
||||||
"actions/make/cpp/test_flags.lua",
|
"actions/make/cpp/test_flags.lua",
|
||||||
|
"actions/make/cpp/test_ldflags.lua",
|
||||||
"actions/make/cpp/test_make_pch.lua",
|
"actions/make/cpp/test_make_pch.lua",
|
||||||
"actions/make/cpp/test_make_linking.lua",
|
"actions/make/cpp/test_make_linking.lua",
|
||||||
"actions/make/cpp/test_objects.lua",
|
"actions/make/cpp/test_objects.lua",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/make/cpp/test_flags.lua
|
-- tests/actions/make/cpp/test_flags.lua
|
||||||
-- Tests compiler and linker flags for Makefiles.
|
-- Tests compiler and linker flags for Makefiles.
|
||||||
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
local suite = test.declare("make_flags")
|
local suite = test.declare("make_flags")
|
||||||
|
50
tests/actions/make/cpp/test_ldflags.lua
Normal file
50
tests/actions/make/cpp/test_ldflags.lua
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
--
|
||||||
|
-- tests/actions/make/cpp/test_ldflags.lua
|
||||||
|
-- Tests compiler and linker flags for Makefiles.
|
||||||
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
|
--
|
||||||
|
|
||||||
|
local suite = test.declare("make_ldflags")
|
||||||
|
local make = premake.make
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Setup
|
||||||
|
--
|
||||||
|
|
||||||
|
local wks, prj
|
||||||
|
|
||||||
|
function suite.setup()
|
||||||
|
wks, prj = test.createWorkspace()
|
||||||
|
flags("Symbols")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function prepare(calls)
|
||||||
|
local cfg = test.getconfig(prj, "Debug")
|
||||||
|
local toolset = premake.tools.gcc
|
||||||
|
make.ldFlags(cfg, toolset)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Check the output from default project values.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.checkDefaultValues()
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS)
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Check addition of library search directores.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.checkLibDirs()
|
||||||
|
libdirs { "../libs", "libs" }
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L../libs -Llibs
|
||||||
|
]]
|
||||||
|
end
|
Reference in New Issue
Block a user