mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Add support for Visual Leak Detector, since valgrind doesn't support MSVC
This commit is contained in:
23
cmake/FindVLD.cmake
Normal file
23
cmake/FindVLD.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
if(VLD_INCLUDE_DIR AND VLD_LIBRARY)
|
||||
set(VLD_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
find_path(VLD_INCLUDE_DIR vld.h)
|
||||
find_library(VLD_LIBRARY NAMES vld)
|
||||
set(VLD_LIBRARIES ${VLD_LIBRARY})
|
||||
|
||||
|
||||
if(VLD_INCLUDE_DIR AND VLD_LIBRARY)
|
||||
set(VLD_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if (VLD_FOUND)
|
||||
if(NOT VLD_FIND_QUIETLY)
|
||||
message(STATUS "Found Visual Leak Detector: ${VLD_INCLUDE_DIR}")
|
||||
endif()
|
||||
else()
|
||||
if(VLD_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Visual Leak Detector")
|
||||
endif()
|
||||
endif()
|
Reference in New Issue
Block a user