-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.sh
executable file
·60 lines (49 loc) · 2.2 KB
/
configure.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /usr/bin/env sh
#=============================================================================
# FileName: configure.sh
# Desc: Makefile generator
# Author: Federico Perazzi
# Email: federico.perazzi@disneyresearch.com
# Version: 0.0.1
# LastChange: 2012-03-22 21:42:25
#=============================================================================
# ----------------------------------------------------------------------------
# A Benchmark Dataset and Evaluation Methodology for Video Object Segmentation
#-----------------------------------------------------------------------------
# Copyright (c) 2016 Federico Perazzi
# Licensed under the BSD License [see LICENSE for details]
# Written by Federico Perazzi
# ----------------------------------------------------------------------------
if cmake --version >/dev/null 2>&1
then
echo
else
echo "\nError: CMake found. Please install it. (see http://www.cmake.org/)\n"
exit
fi
for config in Release Debug
do
build_type=$(echo $config | tr '[A-Z]' '[a-z]')
echo "------------------------------------------------------------------------"
echo "Generating $config Makefile"
echo "------------------------------------------------------------------------"
mkdir -p build/$build_type
(cd build/$build_type; cmake ../../ -DCMAKE_BUILD_TYPE:STRING=$config)
echo
done
if [ -f build/$build_type/Makefile ] && [ -f build/$build_type/Makefile ]
then
echo "##############################################################################"
echo "Makefile successfully generated"
echo -e "##############################################################################\n\n"
echo -e "1. TO BUILD the source code:\n"
echo -e " make -C build/{debug,release}\n"
echo -e "2. Targets clean/cleanall have been generated for convenience\n"
echo -e "3. Executables and libraries can be found in in ./build{debug,release}\n"
echo -e "4. Use ccmake build/{debug,release} to visualize and/or change options.\n"
#EOF
else
echo -e "##############################################################################"
echo -e "BUILDING PROCESS FAILED"
echo -e "##############################################################################\n\n"
fi