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
22f26ebe
Commit
22f26ebe
authored
Dec 17, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved visual studio compilation instructions
parent
cb4f78ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
CMakeLists.txt
examples/CMakeLists.txt
+23
-23
No files found.
examples/CMakeLists.txt
View file @
22f26ebe
...
...
@@ -66,16 +66,16 @@ target_link_libraries(assignment_learning_ex dlib::dlib)
#
# The cmake .. command looks in the parent folder for a file named
# CMakeLists.txt, reads it, sets up everything needed to build program. Also,
# note that CMake can generate Visual Studio or XCode project files. So
# i
f i
nstead you had written:
# note that CMake can generate Visual Studio or XCode project files. So
if
# instead you had written:
# mkdir build
# cmake .. -G
"Visual Studio 14 2015 Win64" ..
# cmake .. -G
Xcode
#
# You would be able to open the resulting
visual studio project and compile and
#
edit the example programs within the visual studio IDE. CMake can generate a
#
lot of different types of IDE projects. Run the cmake -h command to see a list
#
of arguments to -G to see what kinds of projects cmake can generate for you.
#
It
probably includes your favorite IDE in the list.
# You would be able to open the resulting
Xcode project and compile and edit
#
the example programs within the Xcode IDE. CMake can generate a lot of
#
different types of IDE projects. Run the cmake -h command to see a list of
#
arguments to -G to see what kinds of projects cmake can generate for you. It
# probably includes your favorite IDE in the list.
...
...
@@ -109,7 +109,19 @@ endmacro()
# The deep learning toolkit requires a compiler with essentially complete C++11
# support. However, versions of Visual Studio prior to October 2016 didn't
# provide enough C++11 support to compile the DNN tooling, but were good enough
# to compile the rest of dlib.
# to compile the rest of dlib. So new versions of Visual Studio 2015 will
# work. However, Visual Studio 2017 had some C++11 support regressions, so it
# wasn't until December 2017 that Visual Studio 2017 had good enough C++11
# support to compile the DNN examples. So if you are using Visual Studio, make
# sure you have an updated version if you want to compile the DNN code.
#
# Also note that Visual Studio users should give the -T host=x64 option so that
# CMake will instruct Visual Studio to use its 64bit toolchain. If you don't
# do this then by default Visual Studio uses a 32bit toolchain, WHICH RESTRICTS
# THE COMPILER TO ONLY 2GB OF RAM, causing it to run out of RAM and crash when
# compiling some of the DNN examples. So generate your project with a statement
# like this:
# cmake .. -G "Visual Studio 14 2015 Win64" -T host=x64
if
(
NOT USING_OLD_VISUAL_STUDIO_COMPILER
)
add_example
(
dnn_metric_learning_ex
)
add_gui_example
(
dnn_face_recognition_ex
)
...
...
@@ -126,20 +138,8 @@ if (NOT USING_OLD_VISUAL_STUDIO_COMPILER)
add_example
(
dnn_mmod_train_find_cars_ex
)
add_gui_example
(
dnn_semantic_segmentation_ex
)
add_example
(
dnn_imagenet_train_ex
)
if
(
NOT MSVC
)
# Don't try to compile these programs using Visual Studio since it causes the
# compiler to run out of RAM and to crash. Maybe someday Visual Studio
# won't be broken :(
# (NB: While the 32-bit VC++ compiler launched by the Visual Studio IDE will
# run out of memory, running a 64-bit MSBuild.exe on the Command Prompt
# seems to work fine. So you can try something like this:
# "C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" C:\path\to\examples.sln /p:Configuration=Release /p:Platform=x64 /t:dnn_imagenet_train_ex
# Note that you may additionally need to set Debug Information Format to
# C7 compatible (/Z7), in case you get compiler error "cannot update
# program database".)
add_example
(
dnn_semantic_segmentation_train_ex
)
add_example
(
dnn_metric_learning_on_images_ex
)
endif
()
add_example
(
dnn_semantic_segmentation_train_ex
)
add_example
(
dnn_metric_learning_on_images_ex
)
endif
()
...
...
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