[gtkmm] NMake Makefiles: Some cleanups and improvements
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] NMake Makefiles: Some cleanups and improvements
- Date: Tue, 18 May 2021 14:21:14 +0000 (UTC)
commit 815a6e69c67e50655e52359476fd6ba4084f79b4
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 2017 builds. Likewise, disable the /LTCG linker option
when building Visual Studio and 2017 32-bit builds.
MSVC_NMake/build-rules-msvc.mak | 6 +++---
MSVC_NMake/config-msvc.mak | 15 ++++++++++++---
2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index 7c5c1d0e..0343e488 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -67,12 +67,12 @@ $<
{..\demos\gtk-demo\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\}.obj::
@if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ md vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo
- $(CXX) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ /c @<<
+ $(CXX) $(GTKMM_DEMO_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ /c @<<
$<
<<
{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\}.obj::
- $(CC) $(GTKMM_DEMO_CFLAGS) $(CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ /c @<<
+ $(CC) $(GTKMM_DEMO_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\
/Fdvs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo\ /c @<<
$<
<<
@@ -102,7 +102,7 @@ $(gdkmm_OBJS) $(gtkmm_OBJS)
# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
$(GTKMM4_DEMO): $(GTKMM_LIB) vs$(VSVER)\$(CFG)\$(PLAT)\gtkmm4-demo $(gtkmm_demo_OBJS)
- link $(LDFLAGS) $(GTKMM_LIB) $(GTKMM_DEMO_DEP_LIBS) -out:$@ @<<
+ link $(GTKMM_DEMO_LDFLAGS) $(GTKMM_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 76aaef54..a61b3822 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -149,8 +149,7 @@ GDKMM_BASE_CFLAGS = \
/Ivs$(VSVER)\$(CFG)\$(PLAT) \
/I..\untracked\gdk /I..\untracked\gdk\gdkmm \
/I..\gdk /I.\gdkmm \
- /wd4251 /wd4275 /wd4530 /std:c++17 \
- /FImsvc_recommended_pragmas.h /utf-8
+ /std:c++17 /EHsc /FImsvc_recommended_pragmas.h /utf-8
GTKMM_BASE_CFLAGS = \
/Ivs$(VSVER)\$(CFG)\$(PLAT) \
@@ -171,11 +170,21 @@ LIBGTKMM_CFLAGS = \
GTKMM_DEMO_CFLAGS = \
$(GTKMM_BASE_CFLAGS) \
- $(GTKMM_INCLUDES)
+ $(GTKMM_INCLUDES) \
+ $(CFLAGS)
# We build gtkmm-vc$(VSVER_LIB)-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll or
# gtkmm-vc$(VSVER_LIB)-d-$(GTKMM_MAJOR_VERSION)_$(GTKMM_MINOR_VERSION).dll at least
+# 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:/GL=)
+GTKMM_DEMO_LDFLAGS = $(LDFLAGS_NOLTCG)
+!else
+GTKMM_DEMO_LDFLAGS = $(LDFLAGS)
+!endif
+
!if $(VSVER) > 14 && "$(USE_COMPAT_LIBS)" != ""
MESON_VERVER_LIB =
VSVER_LIB = 150
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]