2020-11-21 02:29:25 +08:00
|
|
|
diff --git a/nmake.opt b/nmake.opt
|
|
|
|
index 88e197c..308eddd 100644
|
|
|
|
--- a/nmake.opt
|
|
|
|
+++ b/nmake.opt
|
|
|
|
@@ -147,11 +147,21 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_PDB)
|
|
|
|
CXX_PDB_FLAGS=
|
|
|
|
!ENDIF
|
2018-05-18 14:46:04 +08:00
|
|
|
|
|
|
|
+# 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
|
2019-03-28 02:47:15 +08:00
|
|
|
!IF "$(DEBUG)" == "0"
|
2020-11-21 02:29:25 +08:00
|
|
|
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
|
|
|
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
2018-05-18 14:46:04 +08:00
|
|
|
!ELSE
|
2020-11-21 02:29:25 +08:00
|
|
|
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
|
|
|
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
2018-05-18 14:46:04 +08:00
|
|
|
!ENDIF
|
2020-11-21 02:29:25 +08:00
|
|
|
!ENDIF # OPTFLAGS
|
|
|
|
|