[gtkmm/gtkmm-3-24] NMake Makefiles: Some cleanups and improvements
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-24] NMake Makefiles: Some cleanups and improvements
- Date: Tue, 11 May 2021 10:17:59 +0000 (UTC)
commit 4925cebacbe75ea13cdc24c7a2e0ff42706b52f3
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue May 11 18:07:30 2021 +0800
NMake Makefiles: Some cleanups and improvements
Drop the ignores for warnings C4251, C4273 and C4275 from the warnings that we
want to ignore, as the code is now free of items that trigger those warnings.
Also, reorganize the compiler flags for gtkmm-demo as it is actually the /GL
flag that triggered the internal compiler error when it is used with /EHsc on
32-bit Visual Studio 2015 and 2017 builds. Likewise, disable the /LTCG linker
option when building Visual Studio 2015 and 2017 32-bit builds.
MSVC_NMake/build-rules-msvc.mak | 6 +++---
MSVC_NMake/config-msvc.mak | 14 ++++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index fc2aa319..213174c7 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -64,12 +64,12 @@ $<
rc /fo$@ $<
{..\demos\gtk-demo\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\}.obj::
- $(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
+ $(CXX) $(GTKMM_DEMO_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
$<
<<
{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\}.obj::
- $(CC) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
+ $(CC) $(GTKMM_DEMO_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo\ /c @<<
$<
<<
@@ -111,7 +111,7 @@ $(gtkmm_OBJS)
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
$(GTKMM3_DEMO): $(GTKMM_LIB) vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm3-demo $(gtkmm_demo_OBJS)
- link $(LDFLAGS) $(GTKMM_LIB) $(GDKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@ @<<
+ link $(GTKMM_DEMO_LDFLAGS) $(GTKMM_LIB) $(GDKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@ @<<
$(gtkmm_demo_OBJS)
<<
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 3a32cada..28a182c0 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -124,12 +124,10 @@ GTKMM_DEMO_DEP_LIBS = $(GTKMM_DEP_LIBS) $(EPOXY_LIB)
# CXXFLAGS
GDKMM_BASE_CFLAGS = \
- /EHsc \
/Ivs$(VSVER)\$(CFG)\$(PLAT) \
/I..\untracked\gdk \
/I..\gdk /I.\gdkmm \
- /wd4530 /wd4251 /wd4273 /wd4275 \
- /FImsvc_recommended_pragmas.h
+ /EHsc /FImsvc_recommended_pragmas.h
!if $(VSVER) >= 14
GDKMM_BASE_CFLAGS = \
@@ -156,12 +154,16 @@ LIBGTKMM_CFLAGS = \
GTKMM_DEMO_CFLAGS = \
$(GTKMM_BASE_CFLAGS) \
- $(GTKMM_INCLUDES)
+ $(GTKMM_INCLUDES) \
+ $(CFLAGS)
-# With /EHsc, gtkmm3-demo fails on VS 2015 and 2017 32 bit
+# With /GL, gtkmm3-demo fails on VS 2015 and 2017 32 bit
# with an internal compiler error...
!if $(VSVER) < 16 && "$(PLAT)" == "Win32"
-GTKMM_DEMO_CFLAGS = $(GTKMM_DEMO_CFLAGS:/EHsc=)
+GTKMM_DEMO_CFLAGS = $(GTKMM_DEMO_CFLAGS:/GL=)
+GTKMM_DEMO_LDFLAGS = $(LDFLAGS_NOLTCG)
+!else
+GTKMM_DEMO_LDFLAGS = $(LDFLAGS)
!endif
# We build gdkmm-vc$(VSVER_LIB)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]