cmake: fix compiler flags

pull/9238/head
Alexander Alekhin 8 years ago
parent bf0173bf38
commit 1516103a15
  1. 5
      cmake/OpenCVCompilerOptions.cmake

@ -203,7 +203,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "-O")
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0")
endif()
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -DDEBUG -D_DEBUG")
endif()
if(MSVC)

Loading…
Cancel
Save