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
a20837fb
Commit
a20837fb
authored
Jun 18, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed precompiled headers support detection
parent
f392ab0e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+0
-0
OpenCVPCHSupport.cmake
cmake/OpenCVPCHSupport.cmake
+17
-3
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+12
-1
No files found.
cmake/OpenCVModule.cmake
View file @
a20837fb
This diff is collapsed.
Click to expand it.
cmake/OpenCVPCHSupport.cmake
View file @
a20837fb
# taken from http://
www.vtk.org
/Bug/view.php?id=1260 and slightly adjusted
# taken from http://
public.kitware.com
/Bug/view.php?id=1260 and slightly adjusted
# - Try to find precompiled headers support for GCC 3.4 and 4.x
# Once done this will define:
...
...
@@ -26,8 +26,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET
(
_PCH_include_prefix
"-I"
)
SET
(
_PCH_isystem_prefix
"-isystem"
)
ELSEIF
(
WIN32
)
SET
(
PCHSupport_FOUND TRUE
)
# for experimental msvc support
ELSEIF
(
CMAKE_GENERATOR MATCHES
"^Visual.*$"
)
SET
(
PCHSupport_FOUND TRUE
)
SET
(
_PCH_include_prefix
"/I"
)
SET
(
_PCH_isystem_prefix
"/I"
)
ELSE
()
...
...
@@ -324,3 +324,17 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
endif
()
ENDMACRO
(
ADD_NATIVE_PRECOMPILED_HEADER
)
macro
(
ocv_add_precompiled_header_to_target the_target pch_header
)
if
(
PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS
"
${
pch_header
}
"
)
if
(
CMAKE_GENERATOR MATCHES Visual
)
set
(
${
the_target
}
_pch
"
${
pch_header
}
"
)
add_native_precompiled_header
(
${
the_target
}
${
pch_header
}
)
unset
(
${
the_target
}
_pch
)
elseif
(
CMAKE_GENERATOR MATCHES Xcode
)
add_native_precompiled_header
(
${
the_target
}
${
pch_header
}
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX AND CMAKE_GENERATOR MATCHES
"Makefiles|Ninja"
)
add_precompiled_header
(
${
the_target
}
${
pch_header
}
)
endif
()
endif
()
endmacro
()
cmake/OpenCVUtils.cmake
View file @
a20837fb
...
...
@@ -384,6 +384,17 @@ macro(ocv_list_add_suffix LST SUFFIX)
endmacro
()
# gets and removes the first element from list
macro
(
ocv_list_pop_front LST VAR
)
if
(
${
LST
}
)
list
(
GET
${
LST
}
0
${
VAR
}
)
list
(
REMOVE_AT
${
LST
}
0
)
else
()
set
(
${
VAR
}
""
)
endif
()
endmacro
()
# simple regex escaping routine (does not cover all cases!!!)
macro
(
ocv_regex_escape var regex
)
string
(
REGEX REPLACE
"([+.*^$])"
"
\\\\
1"
${
var
}
"
${
regex
}
"
)
...
...
@@ -401,7 +412,7 @@ endmacro()
# convert list of paths to full paths
macro
(
ocv_to_full_paths VAR
)
macro
(
ocv_
convert_
to_full_paths VAR
)
if
(
${
VAR
}
)
set
(
__tmp
""
)
foreach
(
path
${${
VAR
}}
)
...
...
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