Fix file exclusions for Gmake target

This commit is contained in:
Jason Perkins 2012-07-04 12:52:25 -04:00
parent 2386e328b0
commit be819ed338
2 changed files with 11 additions and 6 deletions

View File

@ -291,16 +291,13 @@
configs[cfg] = { objects={}, resources={} }
end
-- for each file in the iterator below, keep track of which
-- configurations to which it belongs
local incfg = {}
-- now walk the list of files in the project
local tr = project.getsourcetree(prj)
premake.tree.traverse(tr, {
onleaf = function(node, depth)
-- figure out what configurations contain this file, and
-- if it uses custom build rules
local incfg = {}
local inall = true
local custom = false
for cfg in project.eachconfig(prj) do

View File

@ -63,7 +63,9 @@ OBJECTS := \
function suite.configFilesAreConditioned()
configuration "Debug"
files { "src/hello.cpp" }
files { "src/hello_debug.cpp" }
configuration "Release"
files { "src/hello_release.cpp" }
prepare()
test.capture [[
OBJECTS := \
@ -72,7 +74,13 @@ RESOURCES := \
ifeq ($(config),debug)
OBJECTS += \
$(OBJDIR)/hello.o \
$(OBJDIR)/hello_debug.o \
endif
ifeq ($(config),release)
OBJECTS += \
$(OBJDIR)/hello_release.o \
endif