Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
94729e48
Commit
94729e48
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Clean-up master branch
parent
69a9a1cd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab/functions.sh
+26
-18
26 additions, 18 deletions
gitlab/functions.sh
with
26 additions
and
18 deletions
gitlab/functions.sh
+
26
−
18
View file @
94729e48
...
...
@@ -3,8 +3,8 @@
# Build utilities
# Determines the
architecture
we're using
arch
()
{
# Determines the
operating system
we're using
osname
()
{
[[
"
$(
uname
-s
)
"
==
"Darwin"
]]
&&
echo
"macosx"
||
echo
"linux"
}
...
...
@@ -196,7 +196,7 @@ check_pass DOCUSER
check_pass DOCPASS
# Sets up variables
ARCH
=
`
arch
`
OSNAME
=
`
osname
`
if
[
-z
"
${
CONDA_FOLDER
}
"
]
;
then
CONDA_FOLDER
=
/opt/conda
...
...
@@ -213,15 +213,28 @@ fi
PREFIX
=
${
CI_PROJECT_DIR
}
/
${
VIRTUALENV_PATH
}
if
[
"
${
ARCH
}
"
==
"linux"
]
;
then
if
[
"
${
OSNAME
}
"
==
"linux"
]
;
then
# Temporary hack to get building done right with gcc-5 compilers
if
[
-z
"
${
CFLAGS
}
"
]
;
then
CFLAGS
=
"-D_GLIBCXX_USE_CXX11_ABI=0"
CFLAGS
=
"-D_GLIBCXX_USE_CXX11_ABI=0
-pthread
"
else
CFLAGS
=
"
${
CFLAGS
}
-D_GLIBCXX_USE_CXX11_ABI=0"
if
[[
"
${
CFLAGS
}
"
!=
*
-pthread
*
]]
;
then
CFLAGS
=
"
${
CFLAGS
}
-pthread"
fi
if
[[
"
${
CFLAGS
}
"
!=
*
-D_GLIBCXX_USE_CXX11_ABI
=
0
*
]]
;
then
CFLAGS
=
"
${
CFLAGS
}
-D_GLIBCXX_USE_CXX11_ABI=0"
fi
fi
else
#macosx
if
[
-z
"
${
CFLAGS
}
"
]
;
then
CFLAGS
=
"-pthread"
elif
[[
"
${
CFLAGS
}
"
!=
*
-pthread
*
]]
;
then
CFLAGS
=
"
${
CFLAGS
}
-pthread"
fi
if
[
"
${
CFLAGS
}
"
==
*
-DBZ_DEBUG
*
]
;
then
# -DBZ_DEBUG does not work well with clang
CFLAGS
=
`
echo
${
CFLAGS
}
|
sed
-e
s/
\s
*
-DBZ_DEBUG
//g
`
fi
else
CFLAGS
=
""
fi
CXXFLAGS
=
${
CFLAGS
}
...
...
@@ -236,8 +249,9 @@ if [ -z "${BOB_PREFIX_PATH}" ]; then
fi
fi
LD_LIBRARY_PATH
=
${
BOB_PREFIX_PATH
}
/lib
if
[
"
${
ARCH
}
"
==
"macosx"
]
;
then
if
[
"
${
OSNAME
}
"
==
"macosx"
]
;
then
DYLD_FALLBACK_LIBRARY_PATH
=
${
BOB_PREFIX_PATH
}
/lib
MACOSX_DEPLOYMENT_TARGET
=
10.9
fi
if
[
-z
"
${
PYPISERVER
}
"
]
;
then
...
...
@@ -246,7 +260,7 @@ fi
TESTSERVER
=
https://testpypi.python.org/pypi
check_env
ARCH
check_env
OSNAME
check_env PYVER
check_env PREFIX
export_env CFLAGS
...
...
@@ -257,8 +271,9 @@ check_env TESTSERVER
check_env CONDA_FOLDER
check_env VIRTUALENV_PATH
export_env LD_LIBRARY_PATH
if
[
"
${
ARCH
}
"
==
"macosx"
]
;
then
if
[
"
${
OSNAME
}
"
==
"macosx"
]
;
then
export_env DYLD_FALLBACK_LIBRARY_PATH
export_env MACOSX_DEPLOYMENT_TARGET
fi
export_env BOB_PREFIX_PATH
...
...
@@ -277,10 +292,3 @@ fi
# Activates conda environment
run_cmd
source
${
BOB_PREFIX_PATH
}
/bin/activate
`
basename
${
BOB_PREFIX_PATH
}
`
# Patches conda environment
log_info
"Patching build flags to provide for conda..."
CFLAGS
=
"
${
CFLAGS
}
-pthread"
export_env CFLAGS
CXXFLAGS
=
"
${
CXXFLAGS
}
-pthread"
export_env CXXFLAGS
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