2016-11-24 01:30:50 +08:00
|
|
|
diff --git a/nmake.opt b/nmake.opt
|
2017-09-27 01:13:28 +08:00
|
|
|
index bd5719c2d1..f6101ccd59 100644
|
2016-11-24 01:30:50 +08:00
|
|
|
--- a/nmake.opt
|
|
|
|
+++ b/nmake.opt
|
2017-09-27 01:13:28 +08:00
|
|
|
@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
|
2016-11-24 01:30:50 +08:00
|
|
|
CXX_PDB_FLAGS=
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd)
|
|
|
|
+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well
|
|
|
|
+!IFNDEF CXX_CRT_FLAGS
|
|
|
|
+!IFNDEF DEBUG
|
|
|
|
+CXX_CRT_FLAGS=/MD
|
|
|
|
+!ELSE
|
|
|
|
+CXX_CRT_FLAGS=/MDd
|
|
|
|
+!ENDIF
|
|
|
|
+!ENDIF
|
|
|
|
+
|
|
|
|
!IFNDEF OPTFLAGS
|
|
|
|
!IF $(MSVC_VER) >= 1400
|
|
|
|
!IFNDEF DEBUG
|
2017-09-27 01:13:28 +08:00
|
|
|
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
2016-11-24 01:30:50 +08:00
|
|
|
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
|
|
|
!ELSE
|
2017-09-27 01:13:28 +08:00
|
|
|
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
2016-11-24 01:30:50 +08:00
|
|
|
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
|
|
|
!ENDIF
|
|
|
|
!ELSE
|
|
|
|
!IFNDEF DEBUG
|
2017-09-27 01:13:28 +08:00
|
|
|
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG
|
2016-11-24 01:30:50 +08:00
|
|
|
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG
|
|
|
|
!ELSE
|
2017-09-27 01:13:28 +08:00
|
|
|
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG
|
2016-11-24 01:30:50 +08:00
|
|
|
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG
|
|
|
|
!ENDIF
|
|
|
|
!ENDIF #MSVC_VER
|
|
|
|
!ENDIF # OPTFLAGS
|