Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92198438
site_init.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 18, 05:51
Size
1 KB
Mime Type
text/x-python
Expires
Wed, Nov 20, 05:51 (2 d)
Engine
blob
Format
Raw Data
Handle
22384390
Attached To
rTAMAAS tamaas
site_init.py
View Options
from
SCons.Script
import
*
from
os.path
import
*
def
tamaas
(
env
):
"""Sets correct environement variables for Tamaas.
- 'TAMAAS_PATH' is list of potential tamaas repositories
- 'TAMAAS_BUILD_TYPE' is the build type of tamaas (release, debug, profiling)"""
if
env
.
GetOption
(
"clean"
):
return
build_type
=
"release"
if
'TAMAAS_BUILD_TYPE'
in
env
:
build_type
=
env
[
'TAMAAS_BUILD_TYPE'
]
path
=
findPath
(
env
[
'TAMAAS_PATH'
],
build_type
)
if
not
path
:
print
"Tamaas ({}) not found in {}"
.
format
(
build_type
,
env
[
'TAMAAS_PATH'
])
Exit
(
1
)
env
.
AppendUnique
(
CPPPATH
=
[
abspath
(
join
(
path
,
'src'
))])
env
.
AppendUnique
(
LIBPATH
=
[
abspath
(
join
(
path
,
'build-{}/src'
.
format
(
build_type
)))])
env
.
AppendUnique
(
RPATH
=
[
abspath
(
join
(
path
,
'build-{}/src'
.
format
(
build_type
)))])
def
findPath
(
search
,
build_type
):
trial
=
Environment
()
conf
=
Configure
(
trial
)
for
path
in
search
:
trial
[
'CPPPATH'
]
=
join
(
path
,
'src'
)
trial
[
'LIBPATH'
]
=
join
(
path
,
'build-{}/src'
.
format
(
build_type
))
trial
[
'RPATH'
]
=
join
(
path
,
'build-{}/src'
.
format
(
build_type
))
if
conf
.
CheckLib
(
"Tamaas"
,
language
=
"CXX"
):
return
path
Event Timeline
Log In to Comment