diff --git a/CMakeLists.txt b/CMakeLists.txt index b4e02207a4..119710cf34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -948,10 +948,9 @@ if(ENABLE_FUZZER) endif() if(MSVC) - set(ENABLE_VLD OFF CACHE BOOL "Whether enable Visual Leak Detect in Debug configuration") if(ENABLE_VLD) include(FindVLD) - if(NOT VLD_FOUND) + if(NOT VLD_FOUND) message(FATAL_ERROR "ENABLE_VLD was requested, but not found!") endif() message(STATUS "Enabling Visual Leak Detector in Debug configuration") diff --git a/CMakeOptions.txt b/CMakeOptions.txt index 4c42664645..d76851d1a1 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -63,6 +63,7 @@ endif() if (WIN32) option(ENABLE_LTO "Improves performance using Link time Optimization" ON) + option(ENABLE_VLD "Enable Visual Leak Detect in Debug configuration" OFF) else() option(ENABLE_LTO "Improves performance using Link time Optimization" OFF) endif()