[CMake] VS2013 64bit build does not include debug information

Daniel Kollmann dankolle at mail.de
Fri Jan 16 06:16:11 EST 2015


Hello everybody,

 

 

I am using Cmake to generate my VS2013 solutions. My problem right now is
that no debug information is included as well as no debug preprocessor
symbols are set (DEBUG _DEBUG WIN32 _WINDOWS).

 

I run cmake without CMAKE_BUILD_TYPE specified as I select that in VS. So I
need to stick to build type specific variables. But those do not seem to
work.

 

This is my command line: " cmake.exe -H.
-B"../../../../Intermediate/Creator" -G "Visual Studio 12 2013 Win64" "

 

My CMakeLists.txt roughly looks like this:

 

if(WIN32)

                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")

                set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")

endif()

 

project(Creator)

 

set(COMPILE_DEFINITIONS_DEBUG "${COMPILE_DEFINITIONS_DEBUG}
-DCHECK_MEMORY_LEAKS=1")

 

.

 

 

When I use add_definitions() or add_compile_options() they work fine but are
of course not build type dependent outside of cmake.

 

 

Any suggestion what I could to have cmake set the default debug definitions
and compiler options for my project?

 

 

Thanks

Dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150116/3b8d838c/attachment.html>


More information about the CMake mailing list