Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
18c52c30
Commit
18c52c30
authored
May 18, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored -O2 for MinGW
parent
28297c02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+16
-1
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
18c52c30
if
(
MINGW
)
# 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
)
string
(
REPLACE
"-O3"
"-O2"
${
flags
}
"
${${
flags
}}
"
)
endforeach
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCC
)
foreach
(
flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG
)
string
(
REPLACE
"-O3"
"-O2"
${
flags
}
"
${${
flags
}}
"
)
endforeach
()
endif
()
endif
()
if
(
MSVC
)
if
(
MSVC
)
if
(
CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS_INIT
)
if
(
CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS_INIT
)
# override cmake default exception handling option
# override cmake default exception handling option
...
@@ -14,7 +29,7 @@ set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
...
@@ -14,7 +29,7 @@ set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
""
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
""
)
if
(
MINGW
)
if
(
MINGW
)
#
mingw compiler is known to produce unstable SSE code
#
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
# here we are trying to workaround the problem
# here we are trying to workaround the problem
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
CHECK_CXX_COMPILER_FLAG
(
-mstackrealign HAVE_STACKREALIGN_FLAG
)
CHECK_CXX_COMPILER_FLAG
(
-mstackrealign HAVE_STACKREALIGN_FLAG
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment