CMakeUserFindVLD: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Add explicit preformat markup)
(Remove leading space rectangles from preformatted blocks)
Line 1: Line 1:
<pre>
<pre>
##  
##  
## Try to find Visual Leak Debugger library (VDL)
## Try to find Visual Leak Debugger library (VDL)
## See http://www.codeproject.com/tools/visualleakdetector.asp for details
## See http://www.codeproject.com/tools/visualleakdetector.asp for details
##
##
## Once run this will define:  
## Once run this will define:  
##  
##  
## VLD_FOUND
## VLD_FOUND
## VLD_INCLUDE_DIR  
## VLD_INCLUDE_DIR  
##
##
## Jan Woetzel 08/2005
## Jan Woetzel 08/2005
## www.mip.informatik.uni-kiel.de/~jw
## www.mip.informatik.uni-kiel.de/~jw
##
##
## tested with vdl-1.0 on Windows with Visual Studio .Net 2003
## tested with vdl-1.0 on Windows with Visual Studio .Net 2003
##
##
## --------------------------------
## --------------------------------
SET(VLD_FOUND FALSE)
SET(VLD_FOUND FALSE)
 
## VLD works only in Microsoft Visual Studio on Windows:
## VLD works only in Microsoft Visual Studio on Windows:
IF(WIN32)
IF(WIN32)
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
 
FIND_PATH(VLD_INCLUDE_DIR vld.h
FIND_PATH(VLD_INCLUDE_DIR vld.h
  $ENV{VLD_HOME}/include
$ENV{VLD_HOME}/include
  $ENV{VLD_HOME}
$ENV{VLD_HOME}
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
  )
  #MESSAGE("VLD_INCLUDE_DIR=${VLD_INCLUDE_DIR}")
## this is just required for runtim enabling/disabling:
FIND_PATH(VLD_INCLUDE_DIR_API vldapi.h
  $ENV{VLD_HOME}/include
  $ENV{VLD_HOME}
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
  )
  )
#MESSAGE("VLD_INCLUDE_DIR_API=${VLD_INCLUDE_DIR}")
#MESSAGE("VLD_INCLUDE_DIR=${VLD_INCLUDE_DIR}")
 
FIND_LIBRARY(VLD_LIBRARY_VLD
## this is just required for runtim enabling/disabling:
  NAMES vld
FIND_PATH(VLD_INCLUDE_DIR_API vldapi.h
  PATHS
  $ENV{VLD_HOME}/include
  $ENV{VLD_HOME}/lib
$ENV{VLD_HOME}
  $ENV{VLD_HOME}
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
)
  DOC "Visual Leak Debugger multithreaded library"
#MESSAGE("VLD_INCLUDE_DIR_API=${VLD_INCLUDE_DIR}")
  )
 
#MESSAGE("VLD_LIBRARY_VLD=${VLD_LIBRARY_VLD}")
FIND_LIBRARY(VLD_LIBRARY_VLD
   
NAMES vld
FIND_LIBRARY(VLD_LIBRARY_VLDMT
PATHS  
  NAMES vldmt
$ENV{VLD_HOME}/lib
  PATHS
$ENV{VLD_HOME}
  $ENV{VLD_HOME}/lib
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
  $ENV{VLD_HOME}
DOC "Visual Leak Debugger multithreaded library"
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
  DOC "Visual Leak Debugger multithreaded library"
  )
#MESSAGE("VLD_LIBRARY_VLDMT=${VLD_LIBRARY_VLDMT}")
FIND_LIBRARY(VLD_LIBRARY_VLDMTDLL
  NAMES vldmtdll
  PATHS  
  $ENV{VLD_HOME}/lib
  $ENV{VLD_HOME}
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
  DOC "Visual Leak Debugger multithreaded library"
  )
#MESSAGE("VLD_LIBRARY_VLDMTDLL=${VLD_LIBRARY_VLDMTDLL}")
IF(VLD_INCLUDE_DIR)
  IF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
    ## do NOT add LIBRARIES because dependencies are handled through pragmas.
    SET(VLD_FOUND TRUE)
    # MESSAGE("found VLD.")
  ENDIF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
ENDIF(VLD_INCLUDE_DIR)
MARK_AS_ADVANCED(
  VLD_INCLUDE_DIR
  VLD_INCLUDE_DIR_API
  VLD_LIBRARY_VLD
  VLD_LIBRARY_VLDMT
  VLD_LIBRARY_VLDMTDLL
  VLD_LIBRARIES
  )
  )
   
#MESSAGE("VLD_LIBRARY_VLD=${VLD_LIBRARY_VLD}")
  ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
 
ENDIF(WIN32)
FIND_LIBRARY(VLD_LIBRARY_VLDMT
NAMES vldmt
PATHS
$ENV{VLD_HOME}/lib
  $ENV{VLD_HOME}
  "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
DOC "Visual Leak Debugger multithreaded library"
)
#MESSAGE("VLD_LIBRARY_VLDMT=${VLD_LIBRARY_VLDMT}")
 
FIND_LIBRARY(VLD_LIBRARY_VLDMTDLL
NAMES vldmtdll
PATHS
$ENV{VLD_HOME}/lib
$ENV{VLD_HOME}
"$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
DOC "Visual Leak Debugger multithreaded library"
)
#MESSAGE("VLD_LIBRARY_VLDMTDLL=${VLD_LIBRARY_VLDMTDLL}")
 
IF(VLD_INCLUDE_DIR)
IF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
  ## do NOT add LIBRARIES because dependencies are handled through pragmas.
  SET(VLD_FOUND TRUE)
  # MESSAGE("found VLD.")
ENDIF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
ENDIF(VLD_INCLUDE_DIR)
 
MARK_AS_ADVANCED(
VLD_INCLUDE_DIR
VLD_INCLUDE_DIR_API
VLD_LIBRARY_VLD
VLD_LIBRARY_VLDMT
VLD_LIBRARY_VLDMTDLL
VLD_LIBRARIES
)
 
ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
ENDIF(WIN32)
</pre>
</pre>



Revision as of 21:04, 20 April 2018

## 
## Try to find Visual Leak Debugger library (VDL)
## See http://www.codeproject.com/tools/visualleakdetector.asp for details
##
## Once run this will define: 
## 
## VLD_FOUND
## VLD_INCLUDE_DIR 
##
## Jan Woetzel 08/2005
## www.mip.informatik.uni-kiel.de/~jw
##
## tested with vdl-1.0 on Windows with Visual Studio .Net 2003
##
## --------------------------------
SET(VLD_FOUND FALSE)

## VLD works only in Microsoft Visual Studio on Windows:
IF(WIN32)
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")

FIND_PATH(VLD_INCLUDE_DIR vld.h
 $ENV{VLD_HOME}/include
 $ENV{VLD_HOME}
 "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
 )
#MESSAGE("VLD_INCLUDE_DIR=${VLD_INCLUDE_DIR}")

## this is just required for runtim enabling/disabling: 
FIND_PATH(VLD_INCLUDE_DIR_API vldapi.h
 $ENV{VLD_HOME}/include
 $ENV{VLD_HOME}
 "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/include"
)
#MESSAGE("VLD_INCLUDE_DIR_API=${VLD_INCLUDE_DIR}")

FIND_LIBRARY(VLD_LIBRARY_VLD
 NAMES vld
 PATHS 
 $ENV{VLD_HOME}/lib
 $ENV{VLD_HOME}
 "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
 DOC "Visual Leak Debugger multithreaded library"
 )
#MESSAGE("VLD_LIBRARY_VLD=${VLD_LIBRARY_VLD}")

FIND_LIBRARY(VLD_LIBRARY_VLDMT
 NAMES vldmt
 PATHS 
 $ENV{VLD_HOME}/lib
 $ENV{VLD_HOME}
 "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
 DOC "Visual Leak Debugger multithreaded library"
 )
#MESSAGE("VLD_LIBRARY_VLDMT=${VLD_LIBRARY_VLDMT}")

FIND_LIBRARY(VLD_LIBRARY_VLDMTDLL
 NAMES vldmtdll
 PATHS 
 $ENV{VLD_HOME}/lib
 $ENV{VLD_HOME}
 "$ENV{ProgramFiles}/Microsoft Visual Studio .NET 2003/Vc7/lib"
 DOC "Visual Leak Debugger multithreaded library"
 )
#MESSAGE("VLD_LIBRARY_VLDMTDLL=${VLD_LIBRARY_VLDMTDLL}")

IF(VLD_INCLUDE_DIR)
 IF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
   ## do NOT add LIBRARIES because dependencies are handled through pragmas.
   SET(VLD_FOUND TRUE)
   # MESSAGE("found VLD.")
 ENDIF (VLD_LIBRARY_VLD OR VLD_LIBRARY_VLDMT OR VLD_LIBRARY_VLDMTDLL)
ENDIF(VLD_INCLUDE_DIR)

MARK_AS_ADVANCED(
 VLD_INCLUDE_DIR
 VLD_INCLUDE_DIR_API
 VLD_LIBRARY_VLD
 VLD_LIBRARY_VLDMT
 VLD_LIBRARY_VLDMTDLL
 VLD_LIBRARIES
)

ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
ENDIF(WIN32)



CMake: [Welcome | Site Map]