mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge branch '2.4'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
if(MINGW)
|
||||
if(MINGW OR (X86 AND UNIX AND NOT APPLE))
|
||||
# mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
|
||||
|
||||
@@ -182,10 +182,20 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
|
||||
|
||||
_PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn})
|
||||
#MESSAGE("Add flags ${_target_cflags} to ${_targetName} " )
|
||||
SET_TARGET_PROPERTIES(${_targetName}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS ${_target_cflags}
|
||||
)
|
||||
|
||||
GET_TARGET_PROPERTY(_sources ${_targetName} SOURCES)
|
||||
FOREACH(src ${_sources})
|
||||
if(NOT "${src}" MATCHES "\\.mm$")
|
||||
get_source_file_property(_flags "${src}" COMPILE_FLAGS)
|
||||
if(_flags)
|
||||
set(_flags "${_flags} ${_target_cflags}")
|
||||
else()
|
||||
set(_flags "${_target_cflags}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties("${src}" PROPERTIES COMPILE_FLAGS "${_flags}")
|
||||
endif()
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_CUSTOM_TARGET(pch_Generate_${_targetName}
|
||||
DEPENDS ${_pch_output_to_use}
|
||||
|
||||
Reference in New Issue
Block a user