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
c4246bc5
Commit
c4246bc5
authored
Dec 23, 2014
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update FindCUDA CMake module to the latest version from upstream
parent
fd6ef87c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
14 deletions
+12
-14
FindCUDA.cmake
cmake/FindCUDA.cmake
+0
-0
make2cmake.cmake
cmake/FindCUDA/make2cmake.cmake
+2
-3
parse_cubin.cmake
cmake/FindCUDA/parse_cubin.cmake
+7
-8
run_nvcc.cmake
cmake/FindCUDA/run_nvcc.cmake
+3
-3
No files found.
cmake/FindCUDA.cmake
View file @
c4246bc5
This diff is collapsed.
Click to expand it.
cmake/FindCUDA/make2cmake.cmake
View file @
c4246bc5
...
...
@@ -37,12 +37,11 @@
file
(
READ
${
input_file
}
depend_text
)
if
(
${
depend_text
}
MATCHES
".+
"
)
if
(
NOT
"
${
depend_text
}
"
STREQUAL
"
"
)
# message("FOUND DEPENDS")
# Remember, four backslashes is escaped to one backslash in the string.
string
(
REGEX REPLACE
"
\\\\
"
" "
depend_text
${
depend_text
}
)
string
(
REPLACE
"
\\
"
" "
depend_text
${
depend_text
}
)
# This works for the nvcc -M generated dependency files.
string
(
REGEX REPLACE
"^.* : "
""
depend_text
${
depend_text
}
)
...
...
cmake/FindCUDA/parse_cubin.cmake
View file @
c4246bc5
...
...
@@ -37,11 +37,10 @@
file
(
READ
${
input_file
}
file_text
)
if
(
${
file_text
}
MATCHES
".+
"
)
if
(
NOT
"
${
file_text
}
"
STREQUAL
"
"
)
# Remember, four backslashes is escaped to one backslash in the string.
string
(
REGEX REPLACE
";"
"
\\\\
;"
file_text
${
file_text
}
)
string
(
REGEX REPLACE
"
\n
code"
";code"
file_text
${
file_text
}
)
string
(
REPLACE
";"
"
\\
;"
file_text
${
file_text
}
)
string
(
REPLACE
"
\n
code"
";code"
file_text
${
file_text
}
)
list
(
LENGTH file_text len
)
...
...
@@ -57,7 +56,7 @@ if (${file_text} MATCHES ".+")
# Extract kernel names.
if
(
${
entry
}
MATCHES
"[^g]name = ([^ ]+)"
)
s
tring
(
REGEX REPLACE
".* = ([^ ]+)"
"
\\
1"
entry
${
entry
}
)
s
et
(
entry
"
${
CMAKE_MATCH_1
}
"
)
# Check to see if the kernel name starts with "_"
set
(
skip FALSE
)
...
...
@@ -76,19 +75,19 @@ if (${file_text} MATCHES ".+")
# Registers
if
(
${
entry
}
MATCHES
"reg([ ]+)=([ ]+)([^ ]+)"
)
s
tring
(
REGEX REPLACE
".*([ ]+)=([ ]+)([^ ]+)"
"
\\
3"
entry
${
entry
}
)
s
et
(
entry
"
${
CMAKE_MATCH_3
}
"
)
message
(
"Registers:
${
entry
}
"
)
endif
()
# Local memory
if
(
${
entry
}
MATCHES
"lmem([ ]+)=([ ]+)([^ ]+)"
)
s
tring
(
REGEX REPLACE
".*([ ]+)=([ ]+)([^ ]+)"
"
\\
3"
entry
${
entry
}
)
s
et
(
entry
"
${
CMAKE_MATCH_3
}
"
)
message
(
"Local:
${
entry
}
"
)
endif
()
# Shared memory
if
(
${
entry
}
MATCHES
"smem([ ]+)=([ ]+)([^ ]+)"
)
s
tring
(
REGEX REPLACE
".*([ ]+)=([ ]+)([^ ]+)"
"
\\
3"
entry
${
entry
}
)
s
et
(
entry
"
${
CMAKE_MATCH_3
}
"
)
message
(
"Shared:
${
entry
}
"
)
endif
()
...
...
cmake/FindCUDA/run_nvcc.cmake
View file @
c4246bc5
...
...
@@ -62,7 +62,7 @@ set(cmake_dependency_file "@cmake_dependency_file@") # path
set
(
CUDA_make2cmake
"@CUDA_make2cmake@"
)
# path
set
(
CUDA_parse_cubin
"@CUDA_parse_cubin@"
)
# path
set
(
build_cubin @build_cubin@
)
# bool
set
(
CUDA_HOST_COMPILER
"@CUDA_HOST_COMPILER@"
)
#
bool
set
(
CUDA_HOST_COMPILER
"@CUDA_HOST_COMPILER@"
)
#
path
# We won't actually use these variables for now, but we need to set this, in
# order to force this file to be run again if it changes.
set
(
generated_file_path
"@generated_file_path@"
)
# path
...
...
@@ -106,7 +106,7 @@ list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
# Any -ccbin existing in CUDA_NVCC_FLAGS gets highest priority
list
(
FIND CUDA_NVCC_FLAGS
"-ccbin"
ccbin_found0
)
list
(
FIND CUDA_NVCC_FLAGS
"--compiler-bindir"
ccbin_found1
)
if
(
ccbin_found0 LESS 0 AND ccbin_found1 LESS 0
)
if
(
ccbin_found0 LESS 0 AND ccbin_found1 LESS 0
AND CUDA_HOST_COMPILER
)
if
(
CUDA_HOST_COMPILER STREQUAL
"$(VCInstallDir)bin"
AND DEFINED CCBIN
)
set
(
CCBIN -ccbin
"
${
CCBIN
}
"
)
else
()
...
...
@@ -126,7 +126,7 @@ endif()
# and other return variables are present after executing the process.
macro
(
cuda_execute_process status command
)
set
(
_command
${
command
}
)
if
(
NOT
_command STREQUAL
"
COMMAND"
)
if
(
NOT
"x
${
_command
}
"
STREQUAL
"x
COMMAND"
)
message
(
FATAL_ERROR
"Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command =
${
command
}
)"
)
endif
()
if
(
verbose
)
...
...
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