The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15014 
====================================================================== 
Reported By:                Gunnar Roth
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15014
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-07-10 12:13 EDT
Last Modified:              2014-07-10 12:13 EDT
====================================================================== 
Summary:                    for better release debbuging support for /d2Zi+
option should be added for vs2012 and up
Description: 
since vs2012 the option /d2Zi+ is supported by compiler which created much
better debug info for release build and the debugger can actually use it. there
is only a slight increase in pdb size. see
http://randomascii.wordpress.com/2013/09/11/debugging-optimized-codenew-in-visual-studio-2012/



Additional Information: 
this simple patch add the switch to all projects if the compiler is > 1600

--- a\share\cmake-3.0\Modules/Platform/Windows-MSVC.cmake
+++ b\share\cmake-3.0\Modules/Platform/Windows-MSVC.cmake
@@ -254,6 +257,11 @@
   set(CMAKE_${lang}_FLAGS_INIT
"${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS
/W3${_FLAGS_${lang}}")
   set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")
   set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
   set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
   set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
+  if(MSVC_VERSION GREATER 1600)
+    set(CMAKE_${lang}_FLAGS_DEBUG_INIT "${CMAKE_${lang}_FLAGS_DEBUG_INIT}
/d2Zi+")
+    set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT
"${CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT} /d2Zi+")
+  endif()  
+
 endmacro()

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-07-10 12:13 Gunnar Roth    New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to