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
37212f5e
Commit
37212f5e
authored
Jun 12, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing compiler flags checks.
parent
c5aba337
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
CMakeLists.txt
CMakeLists.txt
+2
-2
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+5
-2
No files found.
CMakeLists.txt
View file @
37212f5e
...
...
@@ -287,13 +287,13 @@ endif()
# ----------------------------------------------------------------------------
# OpenCV compiler and linker options
# ----------------------------------------------------------------------------
include
(
cmake/OpenCVCompilerOptions.cmake REQUIRED
)
# In case of Makefiles if the user does not setup CMAKE_BUILD_TYPE, assume it's Release:
if
(
CMAKE_GENERATOR MATCHES
"Makefiles|Ninja"
AND
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
""
)
set
(
CMAKE_BUILD_TYPE Release
)
endif
()
include
(
cmake/OpenCVCompilerOptions.cmake REQUIRED
)
# ----------------------------------------------------------------------------
# Use statically or dynamically linked CRT?
...
...
cmake/OpenCVCompilerOptions.cmake
View file @
37212f5e
...
...
@@ -33,12 +33,15 @@ set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
""
)
macro
(
add_extra_compiler_option option
)
ocv_check_flag_support
(
CXX
"
${
option
}
"
_varname
${
ARGN
}
)
if
(
CMAKE_BUILD_TYPE
)
set
(
CMAKE_TRY_COMPILE_CONFIGURATION
${
CMAKE_BUILD_TYPE
}
)
endif
()
ocv_check_flag_support
(
CXX
"
${
option
}
"
_varname
"
${
OPENCV_EXTRA_CXX_FLAGS
}
${
ARGN
}
"
)
if
(
${
_varname
}
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
${
option
}
"
)
endif
()
ocv_check_flag_support
(
C
"
${
option
}
"
_varname
${
ARGN
}
)
ocv_check_flag_support
(
C
"
${
option
}
"
_varname
"
${
OPENCV_EXTRA_C_FLAGS
}
${
ARGN
}
"
)
if
(
${
_varname
}
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
${
option
}
"
)
endif
()
...
...
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