mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Now compiling under much more strigent warnings, with Clang and optional C++11 support
This commit is contained in:
@@ -32,6 +32,11 @@ set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
|
||||
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
|
||||
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")
|
||||
|
||||
# if Apple and Clang, enable C++11 support :)
|
||||
if(APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(OPENCV_EXTRA_CXX_FLAGS "-std=c++11 -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
macro(add_extra_compiler_option option)
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
||||
@@ -294,4 +299,4 @@ if(MSVC)
|
||||
if(NOT ENABLE_NOISY_WARNINGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user