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
8073f4b1
Commit
8073f4b1
authored
Apr 01, 2018
by
Davis King
Browse files
Make visual studio build with all cores when building dlib.
parent
aba6e363
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+2
-0
dlib/cmake_utils/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)
...
@@ -770,8 +770,10 @@ if (NOT TARGET dlib)
enable_cpp11_for_target
(
dlib
)
enable_cpp11_for_target
(
dlib
)
if
((
MSVC AND CMAKE_VERSION VERSION_LESS 3.11
)
OR CMAKE_VERSION VERSION_LESS 3.3
)
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 PUBLIC
${
active_compile_opts
}
)
target_compile_options
(
dlib PRIVATE
${
active_compile_opts_private
}
)
else
()
else
()
target_compile_options
(
dlib PUBLIC $<$<COMPILE_LANGUAGE:CXX>:
${
active_compile_opts
}
>
)
target_compile_options
(
dlib PUBLIC $<$<COMPILE_LANGUAGE:CXX>:
${
active_compile_opts
}
>
)
target_compile_options
(
dlib PRIVATE $<$<COMPILE_LANGUAGE:CXX>:
${
active_compile_opts_private
}
>
)
endif
()
endif
()
# Install the library
# Install the library
...
...
dlib/cmake_utils/set_compiler_specific_options.cmake
View file @
8073f4b1
...
@@ -122,6 +122,11 @@ if (MSVC)
...
@@ -122,6 +122,11 @@ if (MSVC)
# that will not be readable by VS 2005.
# that will not be readable by VS 2005.
list
(
APPEND active_compile_opts
"/bigobj"
)
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
)
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
# Clang can compile all Dlib's code at Windows platform. Tested with Clang 5
list
(
APPEND active_compile_opts
"-Xclang -fcxx-exceptions"
)
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