diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-06-14 16:16:25 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-06-14 16:16:25 (GMT) |
commit | b6466061cb06189fa6fdac1e542cb7fbad7dabfd (patch) | |
tree | b2f28d315c2f82920a043516ba0b1809180d73a0 | |
parent | a18fbc3b37e9ee8648fd701c5eb76bc467a4478a (diff) | |
download | CMake-b6466061cb06189fa6fdac1e542cb7fbad7dabfd.zip CMake-b6466061cb06189fa6fdac1e542cb7fbad7dabfd.tar.gz CMake-b6466061cb06189fa6fdac1e542cb7fbad7dabfd.tar.bz2 |
ENH: add NDEBUG to windows release builds for both ide and nmake
-rw-r--r-- | Modules/Platform/Windows-cl.cmake | 12 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 6 | ||||
-rw-r--r-- | Templates/DLLHeader.dsptemplate | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index df8e7de..74c705f 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -44,14 +44,14 @@ SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) SET(CMAKE_BUILD_TYPE_INIT Debug) SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR") SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ") -SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1") -SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2") -SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /D NDEBUG") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /D NDEBUG") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /D NDEBUG") SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000") SET (CMAKE_C_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ") -SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1") -SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2") -SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /D NDEBUG") +SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /D NDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /D NDEBUG") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index bd17fd8..3ab48d3 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -299,7 +299,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, { inlineFunctions = 1; optimized =2; - pre = "WIN32,NDEBUG,_WINDOWS"; + pre = "WIN32,_WINDOWS"; flags += flagsRelease; runtime = 2; } @@ -308,7 +308,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, inlineFunctions = 1; runtime = 2; optimized = 1; - pre = "WIN32,NDEBUG,_WINDOWS"; + pre = "WIN32,_WINDOWS"; flags += flagsMinSize; } else if(strcmp(configName, "RelWithDebInfo") == 0) @@ -316,7 +316,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, inlineFunctions = 1; optimized = 2; runtime = 2; - pre = "WIN32,NDEBUG,_WINDOWS"; + pre = "WIN32,_WINDOWS"; flags += flagsDebugRel; std::string libpath = m_LibraryOutputPath + "$(OutDir)/" + libName + debugPostfix + ".pdb"; diff --git a/Templates/DLLHeader.dsptemplate b/Templates/DLLHeader.dsptemplate index d7c7bf2..ae5e506 100644 --- a/Templates/DLLHeader.dsptemplate +++ b/Templates/DLLHeader.dsptemplate @@ -57,8 +57,8 @@ RSC=rc.exe # PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
@@ -122,9 +122,9 @@ CMAKE_CUSTOM_RULE_CODE # PROP Intermediate_Dir "MinSizeRel"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
@@ -154,8 +154,8 @@ CMAKE_CUSTOM_RULE_CODE # PROP Intermediate_Dir "RelWithDebInfo"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
-# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
|