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
18c42f3e
Commit
18c42f3e
authored
Aug 24, 2017
by
Evgeniy Fominov
Committed by
Davis E. King
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clang support for windows (#772)
parent
faa75fa9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CMakeLists.txt
dlib/CMakeLists.txt
+1
-1
use_cpp_11.cmake
dlib/cmake_utils/use_cpp_11.cmake
+5
-0
No files found.
dlib/CMakeLists.txt
View file @
18c42f3e
...
...
@@ -523,7 +523,7 @@ if (NOT TARGET dlib)
# -std=c++11 option if you let it propagate it to nvcc in some
# cases. So instead we disable this and manually include
# things from CMAKE_CXX_FLAGS in the CUDA_NVCC_FLAGS list below.
if
(
APPLE
)
if
(
APPLE
OR MSVC
)
set
(
CUDA_PROPAGATE_HOST_FLAGS OFF
)
# Grab all the -D flags from CMAKE_CXX_FLAGS so we can pass them
# to nvcc.
...
...
dlib/cmake_utils/use_cpp_11.cmake
View file @
18c42f3e
...
...
@@ -58,6 +58,11 @@ if (CMAKE_VERSION VERSION_LESS "3.1.2")
# Since we don't know what compiler this is just try to build a c++11 project and see if it compiles.
test_compiler_for_cpp11
()
endif
()
elseif
(
MSVC AND 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
message
(
STATUS
"C++11 activated."
)
add_global_compiler_switch
(
"-Xclang -fcxx-exceptions -Xclang -Wno-microsoft-pure-definition -Xclang -Wno-unused-local-typedef"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
elseif
(
MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.24215.1
)
message
(
STATUS
"NOTE: Visual Studio didn't have good enough C++11 support until Visual Studio 2015 update 3 (v19.0.24215.1)"
)
message
(
STATUS
"So we aren't enabling things that require full C++11 support (e.g. the deep learning tools)."
)
...
...
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