Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2013-10-03 18:55:42 +0400
committerJason Perkins <starkos@industriousone.com>2013-10-03 18:55:42 +0400
commitfa7356f6b2bf5522f1bafce31e6e053209055d5d (patch)
tree04e9f539d1d10ba5231a52a01ea9a5ac7ca409bf
parent2d01862fcfed59fa587009d366008493883c2edf (diff)
Pass same flags to PCH compile as C/C++ source code
-rw-r--r--src/actions/make/make_cpp.lua8
-rw-r--r--tests/actions/make/test_make_pch.lua6
-rw-r--r--tests/actions/make/test_wiidev.lua2
-rw-r--r--tests/test_gmake_cpp.lua8
4 files changed, 12 insertions, 12 deletions
diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua
index b3630f2..44c5b2a 100644
--- a/src/actions/make/make_cpp.lua
+++ b/src/actions/make/make_cpp.lua
@@ -237,7 +237,7 @@
_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')
end
- _p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)', table.concat(cc.getcppflags(cfg), " "))
+ _p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), " "))
_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions)))
_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)%s', make.list(cc.getcxxflags(cfg)))
@@ -327,8 +327,8 @@
_p('$(GCH): $(PCH)')
_p('\t@echo $(notdir $<)')
- local cmd = iif(prj.language == "C", "$(CC) -x c-header", "$(CXX) -x c++-header")
- _p('\t$(SILENT) %s $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%%.gch=%%.d)" -c "$<"', cmd)
+ local cmd = iif(prj.language == "C", "$(CC) -x c-header $(ALL_CFLAGS)", "$(CXX) -x c++-header $(ALL_CXXFLAGS)")
+ _p('\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%%.gch=%%.d)" -c "$<"', cmd)
_p('endif')
_p('')
@@ -357,5 +357,5 @@
function cpp.buildcommand(iscfile, objext)
local flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')
- _p('\t$(SILENT) %s -o "$@" -MF $(@:%%.%s=%%.d) -c "$<"', flags, objext)
+ _p('\t$(SILENT) %s $(FORCE_INCLUDE) -o "$@" -MF $(@:%%.%s=%%.d) -c "$<"', flags, objext)
end
diff --git a/tests/actions/make/test_make_pch.lua b/tests/actions/make/test_make_pch.lua
index 4664661..18e6026 100644
--- a/tests/actions/make/test_make_pch.lua
+++ b/tests/actions/make/test_make_pch.lua
@@ -68,7 +68,7 @@
ifneq (,$(PCH))
$(GCH): $(PCH)
@echo $(notdir $<)
- $(SILENT) $(CXX) -x c++-header $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+ $(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
]]
end
@@ -81,7 +81,7 @@ $(GCH): $(PCH)
ifneq (,$(PCH))
$(GCH): $(PCH)
@echo $(notdir $<)
- $(SILENT) $(CC) -x c-header $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
+ $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
]]
end
@@ -98,7 +98,7 @@ $(GCH): $(PCH)
test.capture [[
$(OBJDIR)/main.o: main.cpp
@echo $(notdir $<)
- $(SILENT) $(CXX) $(ALL_CXXFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<"
+ $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
]]
end
diff --git a/tests/actions/make/test_wiidev.lua b/tests/actions/make/test_wiidev.lua
index 2b276f6..f3787a0 100644
--- a/tests/actions/make/test_wiidev.lua
+++ b/tests/actions/make/test_wiidev.lua
@@ -32,7 +32,7 @@
function suite.writesCorrectFlags()
cpp.flags(cfg, premake.gcc)
test.capture [[
- ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)
+ ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
diff --git a/tests/test_gmake_cpp.lua b/tests/test_gmake_cpp.lua
index dde8033..7ce0279 100644
--- a/tests/test_gmake_cpp.lua
+++ b/tests/test_gmake_cpp.lua
@@ -78,7 +78,7 @@ ifeq ($(config),debug)
TARGET = $(TARGETDIR)/MyProject
DEFINES +=
INCLUDES +=
- ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)
+ ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
@@ -112,7 +112,7 @@ ifeq ($(config),debugps3)
TARGET = $(TARGETDIR)/MyProject.elf
DEFINES +=
INCLUDES +=
- ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)
+ ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
@@ -143,7 +143,7 @@ ifeq ($(config),debug64)
TARGET = $(TARGETDIR)/MyProject
DEFINES +=
INCLUDES +=
- ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)
+ ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -m64
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
@@ -175,7 +175,7 @@ ifeq ($(config),debuguniv32)
TARGET = $(TARGETDIR)/libMyProject.a
DEFINES +=
INCLUDES +=
- ALL_CPPFLAGS += $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(FORCE_INCLUDE)
+ ALL_CPPFLAGS += $(CPPFLAGS) $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -arch i386 -arch ppc
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)