Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lib4neuro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MolDyn
lib4neuro
Commits
bb7c0acd
Commit
bb7c0acd
authored
6 years ago
by
Martin Beseda
Browse files
Options
Downloads
Patches
Plain Diff
NEW: Added Batch script for Windows release build.
parent
fcef81f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build_scripts/windows/win_VS_build_x64_release.bat
+137
-0
137 additions, 0 deletions
build_scripts/windows/win_VS_build_x64_release.bat
with
137 additions
and
0 deletions
build_scripts/windows/win_VS_build_x64_release.bat
0 → 100644
+
137
−
0
View file @
bb7c0acd
@echo
off
title
Building
the
'lib4neuro'
project
for
Debug
cls
set
"REBUILD_BOOST="
set
"BUILD_EXAMPLES="
set
"BUILD_TESTS="
set
"BUILD_LIB="
set
"BUILD_SOMETHING="
set
"BUILD_SOMETHING_LIB="
set
"BOOST_ROOT="
set
"LIB4NEURO_INCLUDE_DIR="
set
"MAKEFILE_GENERATOR="
set
"LINK_TYPE="
set
"CLEAN_AF="
rem call VsDevCmd.bat
set
BOOST_ROOT
=
%cd%
..\..\external_dependencies\boost
set
LIB4NEURO_INCLUDE_DIR
=
%cd%
..\..\include
rem Should we rebuild BOOST? (yes/no)
set
REBUILD_BOOST
=
yes
rem Should we build the examples? (yes/no)
set
BUILD_EXAMPLES
=
yes
rem Should we build the unit-tests? (yes/no)
set
BUILD_TESTS
=
yes
rem Should we build the lib4neuro library? (yes/no)
set
BUILD_LIB
=
yes
rem **********************DO NOT CHANGE BEYOND THIS LINE****************************************
set
LINK_TYPE
=
static
IF
"
%DEPENDENCIES_LINK_TYPE%
"
==
"shared"
(
set
LINK_TYPE
=
shared
)
set
CLEAN_AF
=
yes
IF
"
%CLEAN_AFTER%
"
==
"no"
(
set
CLEAN_AF
=
no
)
set
BUILD_SOMETHING
=
no
set
BUILD_SOMETHING_LIB
=
no
IF
"
%BUILD_LIB%
"
==
"yes"
(
echo
Lib4neuro
build
type
:
Debug
echo
Lib4neuro
build
architecture
:
x64
echo
Lib4neuro
will
be
built
in
'build\lib\'
set
BUILD_SOMETHING
=
yes
set
BUILD_SOMETHING_LIB
=
yes
call
win_clean_lib
.bat
)
IF
"
%BUILD_TESTS%
"
==
"yes"
(
echo
Lib4neuro
unit
tests
will
be
built
in
'build\unit-tests'
set
BUILD_SOMETHING
=
yes
set
BUILD_SOMETHING_LIB
=
yes
call
win_clean_tests
.bat
)
IF
"
%BUILD_EXAMPLES%
"
==
"yes"
(
echo
Lib4neuro
examples
will
be
built
in
'build\examples'
set
BUILD_SOMETHING
=
yes
set
BUILD_SOMETHING_LIB
=
yes
call
win_clean_examples
.bat
)
IF
"
%REBUILD_BOOST%
"
==
"yes"
(
echo
The
required
BOOST
library
will
be
recompiled
in
the
directory
'external_dependencies\boost'
set
BUILD_SOMETHING
=
yes
)
IF
"
%BUILD_SOMETHING%
"
==
"yes"
(
rem pause
)
rem Boost rebuild
IF
"
%REBUILD_BOOST%
"
==
"yes"
(
title
Rebuilding
'BOOST'
for
Debug
cd
..\..
rmdir
/s /q
external_dependencies
\boost\stage
2
>
NUL
rmdir
/s /q
external_dependencies
\boost\bin.v2
2
>
NUL
cd
external_dependencies
\boost
.\b2
--layout
=
system
variant
=
release
link
=
%LINK_TYPE%
address
-model
=
64
--with-system --with-serialization --with-random
||
goto
error_occured_boost
cd
..\..\build_scripts\windows
)
IF
"
%BUILD_SOMETHING_LIB%
"
==
"yes"
(
title
Building
the
'lib4neuro'
project
for
Debug
[
preparing
makefiles
]
rem C++ compiler (Requires Visual Studio 2017)
set
CXX_COMPILER
=
cl
set
C_COMPILER
=
cl
set
MAKEFILE_GENERATOR
=
"Visual Studio 15 2017 Win64"
cd
..\..
cmake
-G
"Visual Studio 15 2017 Win64"
-DCMAKE
_VERBOSE_MAKEFILE:BOOL
=
ON
-DCMAKE
_BUILD_TYPE
=
Release
-DCMAKE
_CXX_COMPILER
=
%CXX_COMPILER%
-DCMAKE
_C_COMPILER
=
%C_COMPILER%
-DBOOST
_ROOT
=
%BOOST_ROOT%
-DBOOST
_LIBRARYDIR
=
%BOOST_LIBRARYDIR%
-DBOOST
_INCLUDEDIR
=
%BOOST_INCLUDEDIR%
-DBUILD
_TESTS
=
%BUILD_TESTS%
-DBUILD
_EXAMPLES
=
%BUILD_EXAMPLES%
-DBUILD
_LIB
=
%BUILD_LIB%
-DLIB
4
NEURO_DIR
=
build
\lib
-DDEPENDENCIES
_LINK_TYPE
=
%LINK_TYPE%
-DLIB
4
NEURO_INCLUDE_DIR
=
%LIB4
NEURO_INCLUDE_DIR
%
.
||
goto
error_occured_lib
title
Building
the
'lib4neuro'
project
for
Debug
[
building
]
cmake
--build
.
--config
Debug
&&
echo
"Build complete."
||
goto
error_occured_lib
cd
build_scripts
\windows
)
goto
final_goto
:error
_occured_lib
cd
build_scripts
\windows
goto
final_goto_error
:error
_occured_boost
cd
..\..\build_scripts\windows
goto
final_goto_error
:final
_goto_error
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_LIB%
"
==
"yes"
call
win_clean_after_lib
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_EXAMPLES%
"
==
"yes"
call
win_clean_after_examples
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_TESTS%
"
==
"yes"
call
win_clean_after_tests
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_SOMETHING_LIB%
"
==
"yes"
call
win_clean_garbage
.bat
exit
1
:final
_goto
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_LIB%
"
==
"yes"
call
win_clean_after_lib
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_EXAMPLES%
"
==
"yes"
call
win_clean_after_examples
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_TESTS%
"
==
"yes"
call
win_clean_after_tests
.bat
IF
"
%CLEAN_AF%
"
==
"yes"
IF
"
%BUILD_SOMETHING_LIB%
"
==
"yes"
call
win_clean_garbage
.bat
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment