Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
8073f4b1
Commit
8073f4b1
authored
Apr 01, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make visual studio build with all cores when building dlib.
parent
aba6e363
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
CMakeLists.txt
dlib/CMakeLists.txt
+2
-0
set_compiler_specific_options.cmake
dlib/cmake_utils/set_compiler_specific_options.cmake
+5
-0
No files found.
dlib/CMakeLists.txt
View file @
8073f4b1
...
...
@@ -770,8 +770,10 @@ if (NOT TARGET dlib)
enable_cpp11_for_target
(
dlib
)
if
((
MSVC AND CMAKE_VERSION VERSION_LESS 3.11
)
OR CMAKE_VERSION VERSION_LESS 3.3
)
target_compile_options
(
dlib PUBLIC
${
active_compile_opts
}
)
target_compile_options
(
dlib PRIVATE
${
active_compile_opts_private
}
)
else
()
target_compile_options
(
dlib PUBLIC $<$<COMPILE_LANGUAGE:CXX>:
${
active_compile_opts
}
>
)
target_compile_options
(
dlib PRIVATE $<$<COMPILE_LANGUAGE:CXX>:
${
active_compile_opts_private
}
>
)
endif
()
# Install the library
...
...
dlib/cmake_utils/set_compiler_specific_options.cmake
View file @
8073f4b1
...
...
@@ -122,6 +122,11 @@ if (MSVC)
# that will not be readable by VS 2005.
list
(
APPEND active_compile_opts
"/bigobj"
)
# Build dlib with all cores. Don't propagate the setting to client programs
# though since they might compile large translation units that use too much
# RAM.
list
(
APPEND active_compile_opts_private
"/MP"
)
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3
)
# Clang can compile all Dlib's code at Windows platform. Tested with Clang 5
list
(
APPEND active_compile_opts
"-Xclang -fcxx-exceptions"
)
...
...
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