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
22f26ebe
"src/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "90a103e75290571858e9ddc6bd2e29e81851282a"
Commit
22f26ebe
authored
Dec 16, 2017
by
Davis King
Browse files
Improved visual studio compilation instructions
parent
cb4f78ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
examples/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)
...
@@ -66,16 +66,16 @@ target_link_libraries(assignment_learning_ex dlib::dlib)
#
#
# The cmake .. command looks in the parent folder for a file named
# The cmake .. command looks in the parent folder for a file named
# CMakeLists.txt, reads it, sets up everything needed to build program. Also,
# CMakeLists.txt, reads it, sets up everything needed to build program. Also,
# note that CMake can generate Visual Studio or XCode project files. So
# note that CMake can generate Visual Studio or XCode project files. So
if
#
if
instead you had written:
# instead you had written:
# mkdir build
# 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
# You would be able to open the resulting
Xcode
project and compile and
edit
#
edit
the example programs within the
visual studio
IDE. CMake can generate a
# the example programs within the
Xcode
IDE. CMake can generate a
lot of
#
lot of
different types of IDE projects. Run the cmake -h command to see a list
# different types of IDE projects. Run the cmake -h command to see a list
of
#
of
arguments to -G to see what kinds of projects cmake can generate for you.
# arguments to -G to see what kinds of projects cmake can generate for you.
It
#
It
probably includes your favorite IDE in the list.
# probably includes your favorite IDE in the list.
...
@@ -109,7 +109,19 @@ endmacro()
...
@@ -109,7 +109,19 @@ endmacro()
# The deep learning toolkit requires a compiler with essentially complete C++11
# The deep learning toolkit requires a compiler with essentially complete C++11
# support. However, versions of Visual Studio prior to October 2016 didn't
# 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
# 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
)
if
(
NOT USING_OLD_VISUAL_STUDIO_COMPILER
)
add_example
(
dnn_metric_learning_ex
)
add_example
(
dnn_metric_learning_ex
)
add_gui_example
(
dnn_face_recognition_ex
)
add_gui_example
(
dnn_face_recognition_ex
)
...
@@ -126,20 +138,8 @@ if (NOT USING_OLD_VISUAL_STUDIO_COMPILER)
...
@@ -126,20 +138,8 @@ if (NOT USING_OLD_VISUAL_STUDIO_COMPILER)
add_example
(
dnn_mmod_train_find_cars_ex
)
add_example
(
dnn_mmod_train_find_cars_ex
)
add_gui_example
(
dnn_semantic_segmentation_ex
)
add_gui_example
(
dnn_semantic_segmentation_ex
)
add_example
(
dnn_imagenet_train_ex
)
add_example
(
dnn_imagenet_train_ex
)
if
(
NOT MSVC
)
add_example
(
dnn_semantic_segmentation_train_ex
)
# Don't try to compile these programs using Visual Studio since it causes the
add_example
(
dnn_metric_learning_on_images_ex
)
# 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
()
endif
()
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