Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82369605
detect.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
Wed, Sep 11, 00:55
Size
1 KB
Mime Type
text/x-python
Expires
Fri, Sep 13, 00:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20690286
Attached To
rTAMAAS tamaas
detect.py
View Options
import
SCons
from
SCons.Script
import
Exit
,
Configure
from
os.path
import
join
,
abspath
def
FindGBenchmark
(
env
):
"""
Sets environement for Google's benchmark library
"""
if
env
.
GetOption
(
'clean'
):
return
if
'BENCHMARK_PATH'
not
in
env
:
print
(
"Please set the 'BENCHMARK_PATH' vairiable "
+
"in your scons environment"
)
Exit
(
1
)
bm_vars
=
{}
bm_path
=
abspath
(
env
[
'BENCHMARK_PATH'
])
bm_vars
[
'CPPPATH'
]
=
[
join
(
bm_path
,
'include'
)]
bm_vars
[
'LIBPATH'
]
=
[
join
(
bm_path
,
'build/src'
)]
bm_vars
[
'RPATH'
]
=
bm_vars
[
'LIBPATH'
]
bm_vars
[
'LIBS'
]
=
[
'pthread'
]
conf_env
=
env
.
Clone
(
**
bm_vars
)
conf
=
Configure
(
conf_env
)
if
not
conf
.
CheckLibWithHeader
(
"benchmark"
,
"benchmark/benchmark.h"
,
language
=
"CXX"
):
raise
SCons
.
Errors
.
StopError
(
"Google benchmark was not found in {}"
.
format
(
bm_path
))
conf_env
=
conf
.
Finish
()
bm_vars
[
'LIBS'
]
+=
[
'benchmark'
]
env
.
AppendUnique
(
**
bm_vars
)
Event Timeline
Log In to Comment