Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 26, 2010, 12:00:14 AM (14 years ago)
Author:
rgrieder
Message:

Sorted out Visual Leak Detector issues (using new version 2 now).

Location:
code/forks/sandbox_qt/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_qt/src/CMakeLists.txt

    r7805 r7806  
    5656INCLUDE_DIRECTORIES(
    5757  # External
    58   ${VLD_INCLUDE_DIR}
    5958
    6059  # All includes in "externals" should be prefixed with the path
  • code/forks/sandbox_qt/src/OrxonoxConfig.cmake

    r7380 r7806  
    7979CHECK_INCLUDE_FILE_CXX(iso646.h HAVE_ISO646_H)
    8080
     81IF(MSVC)
     82  # Check whether we can use Visual Leak Detector
     83  FIND_FILE(VLD_DLL vld_x86.dll)
     84  IF(VLD_DLL)
     85    SET(HAVE_VLD TRUE)
     86    OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" off)
     87    # Make sure the value is "on" or "off" for vld.ini
     88    IF(VISUAL_LEAK_DETECTOR_ENABLE)
     89      SET(VISUAL_LEAK_DETECTOR_ENABLE on)
     90    ELSE()
     91      SET(VISUAL_LEAK_DETECTOR_ENABLE off)
     92    ENDIF()
     93  ENDIF()
     94  MARK_AS_ADVANCED(VLD_DLL)
     95ENDIF()
     96
    8197############## Configured Headers ###############
    8298
  • code/forks/sandbox_qt/src/OrxonoxConfig.h.in

    r7421 r7806  
    179179*/
    180180
    181 // Always include the memory leak detector for MSVC except for actual releases
    182 // Note: Although officially supported, VLD does not work with MSVC 9
    183 #if defined(ORXONOX_COMPILER_MSVC) && _MSC_VER < 1500 && !defined(ORXONOX_RELEASE)
     181// Include memory leak detector if available and not building actual release
     182#cmakedefine HAVE_VLD
     183#if defined(HAVE_VLD) && !defined(ORXONOX_RELEASE)
     184    typedef UINT32 uint32_t;
     185    typedef wchar_t WCHAR;
     186    struct HINSTANCE__ { int unused; };
     187    typedef struct HINSTANCE__ * HINSTANCE;
     188    typedef HINSTANCE HMODULE;
    184189#  include <vld.h>
    185190#endif
Note: See TracChangeset for help on using the changeset viewer.