Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
3b794540
Commit
3b794540
authored
Jun 28, 2018
by
Davis King
Browse files
Make pybind11 not break builds that include cuda files.
parent
3de8fa36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
dlib/external/pybind11/tools/pybind11Tools.cmake
dlib/external/pybind11/tools/pybind11Tools.cmake
+10
-1
No files found.
dlib/external/pybind11/tools/pybind11Tools.cmake
View file @
3b794540
...
...
@@ -198,6 +198,15 @@ function(pybind11_add_module target_name)
if
(
MSVC
)
# /MP enables multithreaded builds (relevant when there are many files), /bigobj is
# needed for bigger binding projects due to the limit to 64k addressable sections
target_compile_options
(
${
target_name
}
PRIVATE /MP /bigobj
)
set
(
msvc_extra_options /MP /bigobj
)
if
(
CMAKE_VERSION VERSION_LESS 3.11
)
target_compile_options
(
${
target_name
}
PRIVATE
${
msvc_extra_options
}
)
else
()
# Only set these options for C++ files. This is important so that, for
# instance, projects that include other types of source files like CUDA
# .cu files don't get these options propagated to nvcc since that would
# cause the build to fail.
target_compile_options
(
${
target_name
}
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:
${
msvc_extra_options
}
>
)
endif
()
endif
()
endfunction
()
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