Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7806


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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_qt/cmake/CompilerConfigMSVC.cmake

    r7439 r7806  
    3535
    3636######################## Options ########################
    37 
    38 # Currently VLD has a problem with MSVC9 although it actually is supported
    39 IF(MSVC80)
    40   OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" off)
    41 ENDIF()
    42 # Make sure the value is "on" or "off" for vld.ini
    43 IF(VISUAL_LEAK_DETECTOR_ENABLE)
    44   SET(VISUAL_LEAK_DETECTOR_ENABLE on)
    45 ELSE()
    46   SET(VISUAL_LEAK_DETECTOR_ENABLE off)
    47 ENDIF()
    4837
    4938# Orxonox only supports MSVC 8 and above, which gets asserted above
  • code/forks/sandbox_qt/cmake/PackageConfigMSVC.cmake

    r7421 r7806  
    5656  #SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    5757
    58   # Visual Leak Detector
    59   SET(VLD_INCLUDE_DIR  ${DEP_INCLUDE_DIR}/vld   CACHE PATH "")
    60   SET(VLD_LIBRARY_DIR  ${DEP_LIBRARY_DIR}       CACHE PATH "")
    61   LINK_DIRECTORIES(${VLD_LIBRARY_DIR}) # Used for auto-linking
    62   MARK_AS_ADVANCED(VLD_INCLUDE_DIR VLD_LIBRARY_DIR)
    63 
    6458ENDIF(MSVC)
  • 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.