From 18933c12f75e55efda1f03f041e03073932cac38 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Fri, 2 Mar 2012 14:48:35 +0000 Subject: [PATCH] Disabled BUILD_WITH_DEBUG_INFO flag for MSCV. Now debug info is included in debug configuration --- CMakeLists.txt | 2 +- cmake/OpenCVCRTLinkage.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d02a11193c..b7a2cd8008 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,7 @@ OCV_OPTION(BUILD_EXAMPLES "Build all examples" OCV_OPTION(BUILD_PACKAGE "Enables 'make package_source' command" ON ) OCV_OPTION(BUILD_PERF_TESTS "Build performance tests" ON IF (NOT IOS) ) OCV_OPTION(BUILD_TESTS "Build accuracy & regression tests" ON IF (NOT IOS) ) -OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs" ON ) +OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSCV only)" ON ) OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC ) # 3rd party libs diff --git a/cmake/OpenCVCRTLinkage.cmake b/cmake/OpenCVCRTLinkage.cmake index aa7b0b3f1f..7514285d9f 100644 --- a/cmake/OpenCVCRTLinkage.cmake +++ b/cmake/OpenCVCRTLinkage.cmake @@ -43,7 +43,7 @@ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8 AND NOT ${CMAKE_MI endif() endif() -if(NOT BUILD_WITH_DEBUG_INFO) +if(NOT BUILD_WITH_DEBUG_INFO AND NOT MSVC) string(REPLACE "/debug" "" CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}") string(REPLACE "/DEBUG" "" CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}") string(REPLACE "/INCREMENTAL:YES" "/INCREMENTAL:NO" CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")