From 60f1c9dcdf6f9ef6e8a415a64563abea418792ad Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 1 Feb 2018 19:22:48 +0300 Subject: [PATCH] Do not enable LTO flags for MSVC debug configuration --- cmake/OpenCVCompilerOptions.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index ef8d76428e..b0ec2916b2 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -244,8 +244,8 @@ if(MSVC) endif() if(ENABLE_LTO) - set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /GL") - set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS} /LTCG") + set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /GL") + set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /LTCG") endif() endif()