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
6f6da53c
Commit
6f6da53c
authored
May 31, 2011
by
Alexander Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added SSE compiler flags under Windows+MSVC (ticket #371)
parent
3a4e06e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
CMakeLists.txt
CMakeLists.txt
+27
-0
No files found.
CMakeLists.txt
View file @
6f6da53c
...
...
@@ -277,6 +277,15 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif
()
endif
()
if
(
MSVC
)
set
(
ENABLE_SSE ON CACHE BOOL
"Enable SSE instructions for MSVC"
)
set
(
ENABLE_SSE2 ON CACHE BOOL
"Enable SSE2 instructions for MSVC"
)
if
(
CMAKE_C_COMPILER MATCHES
"icc"
)
set
(
ENABLE_SSE3 OFF CACHE BOOL
"Enable SSE3 instructions for ICC"
)
set
(
ENABLE_SSE4_1 OFF CACHE BOOL
"Enable SSE4.1 instructions for ICC"
)
endif
()
endif
()
# allow fine grained control over which libraries not to link, even if
# they are available on the system
# ====================================================================
...
...
@@ -1023,6 +1032,24 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif
()
if
(
MSVC
)
if
(
ENABLE_SSE
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE"
)
endif
()
if
(
ENABLE_SSE2
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE2"
)
endif
()
if
(
ENABLE_SSE3
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE3"
)
endif
()
if
(
ENABLE_SSE4_1
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE4.1"
)
endif
()
if
(
ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/Oi"
)
endif
()
endif
()
# Extra link libs if the user selects building static libs:
IF
(
NOT BUILD_SHARED_LIBS
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
...
...
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