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
50beef60
Commit
50beef60
authored
Oct 03, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12727 from rnk:fix-clang-cl-cmake
parents
068ebe8b
ffaf5834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+7
-2
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
50beef60
...
...
@@ -86,7 +86,11 @@ endif()
if
(
CV_GCC OR CV_CLANG
)
# High level of warnings.
add_extra_compiler_option
(
-W
)
add_extra_compiler_option
(
-Wall
)
if
(
NOT MSVC
)
# clang-cl interprets -Wall as MSVC would: -Weverything, which is more than
# we want.
add_extra_compiler_option
(
-Wall
)
endif
()
add_extra_compiler_option
(
-Werror=return-type
)
add_extra_compiler_option
(
-Werror=non-virtual-dtor
)
add_extra_compiler_option
(
-Werror=address
)
...
...
@@ -173,7 +177,7 @@ if(CV_GCC OR CV_CLANG)
string
(
REPLACE
"-ffunction-sections"
""
${
flags
}
"
${${
flags
}}
"
)
string
(
REPLACE
"-fdata-sections"
""
${
flags
}
"
${${
flags
}}
"
)
endforeach
()
elseif
(
NOT
((
IOS OR ANDROID
)
AND NOT BUILD_SHARED_LIBS
))
elseif
(
NOT
((
IOS OR ANDROID
)
AND NOT BUILD_SHARED_LIBS
)
AND NOT MSVC
)
# Remove unreferenced functions: function level linking
add_extra_compiler_option
(
-ffunction-sections
)
add_extra_compiler_option
(
-fdata-sections
)
...
...
@@ -266,6 +270,7 @@ endif()
# set default visibility to hidden
if
((
CV_GCC OR CV_CLANG
)
AND NOT MSVC
AND NOT OPENCV_SKIP_VISIBILITY_HIDDEN
AND NOT
"
${
CMAKE_CXX_FLAGS
}
${
OPENCV_EXTRA_FLAGS
}
${
OPENCV_EXTRA_CXX_FLAGS
}
"
MATCHES
" -fvisibility"
)
add_extra_compiler_option
(
-fvisibility=hidden
)
...
...
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