Fixed a (stupid) typo in makefile include dirs list (h/t gogoprog)
This commit is contained in:
parent
b108893bcb
commit
37cfaf0666
@ -245,7 +245,10 @@
|
||||
|
||||
function cpp.flags(cfg, toolset)
|
||||
_p(' DEFINES += %s', table.concat(toolset.getdefines(cfg.defines), " "))
|
||||
_p(' INCLUDES += %s', table.concat(make.esc(toolset.getincludedirs(cfg, cfg.includedirs), " ")))
|
||||
|
||||
local includes = make.esc(toolset.getincludedirs(cfg, cfg.includedirs))
|
||||
_p(' INCLUDES += %s', table.concat(includes, " "))
|
||||
|
||||
_p(' CPPFLAGS += %s $(DEFINES) $(INCLUDES)', table.concat(toolset.getcppflags(cfg), " "))
|
||||
_p(' CFLAGS += $(CPPFLAGS) $(ARCH) %s', table.concat(table.join(toolset.getcflags(cfg), cfg.buildoptions), " "))
|
||||
_p(' CXXFLAGS += $(CFLAGS) %s', table.concat(toolset.getcxxflags(cfg), " "))
|
||||
|
42
tests/actions/make/cpp/test_flags.lua
Normal file
42
tests/actions/make/cpp/test_flags.lua
Normal file
@ -0,0 +1,42 @@
|
||||
--
|
||||
-- tests/actions/make/cpp/test_flags.lua
|
||||
-- Tests compiler and linker flags for Makefiles.
|
||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
T.make_flags = {}
|
||||
local suite = T.make_flags
|
||||
local make = premake.make
|
||||
local cpp = premake.make.cpp
|
||||
local project = premake5.project
|
||||
|
||||
|
||||
--
|
||||
-- Setup
|
||||
--
|
||||
|
||||
local sln, prj, cfg
|
||||
|
||||
function suite.setup()
|
||||
sln = test.createsolution()
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject_ng(sln, 1)
|
||||
cfg = project.getconfig(prj, "Debug")
|
||||
cpp.flags(cfg, premake.tools.gcc)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Include directories should be relative and space separated.
|
||||
--
|
||||
|
||||
function suite.includeDirs()
|
||||
includedirs { "src/include", "../include" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
DEFINES +=
|
||||
INCLUDES += -Isrc/include -I../include
|
||||
]]
|
||||
end
|
@ -168,6 +168,7 @@
|
||||
|
||||
-- Makefile C/C++ projects
|
||||
dofile("actions/make/cpp/test_file_rules.lua")
|
||||
dofile("actions/make/cpp/test_flags.lua")
|
||||
dofile("actions/make/cpp/test_make_pch.lua")
|
||||
dofile("actions/make/cpp/test_make_linking.lua")
|
||||
dofile("actions/make/cpp/test_objects.lua")
|
||||
|
Reference in New Issue
Block a user