Fix RelWithDebInfo build.
authorAndrew Wiggin <ender79bl@gmail.com>
Sat, 29 Oct 2011 16:14:38 +0000 (16:14 +0000)
committerAndrew Wiggin <ender79bl@gmail.com>
Sat, 29 Oct 2011 16:14:38 +0000 (16:14 +0000)
RelWithDebInfo sets the library path to only include release libraries (e.g. python32.lib) but defining _DEBUG when #include'ing python headers inserts a linker directive to require for python32_d.lib. Additionally, RelWithDebInfo should be different from release build in that it builds debugger symbols (.PDBs), it should not have asserts and other debug code.

CMakeLists.txt

index 7631b24..3fd5f3e 100644 (file)
@@ -65,7 +65,7 @@ set(CMAKE_BUILD_TYPE_INIT "Release")
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG           DEBUG _DEBUG)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE         NDEBUG)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL      NDEBUG)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO  DEBUG _DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO  NDEBUG)
 
 
 #-----------------------------------------------------------------------------