diff options
author | Marat Dukhan <maratek@gmail.com> | 2017-03-06 21:18:42 -0500 |
---|---|---|
committer | Marat Dukhan <maratek@gmail.com> | 2017-03-06 21:18:49 -0500 |
commit | d54565dd0056b4f07dfd77bbb74c41b4353bfd6a (patch) | |
tree | 16b8cc00b2363122aa8aab6e913c026765fd7963 /configure.py | |
parent | 712fcb357866cc7e63d9ab7abe2dd10a6066aa00 (diff) | |
download | pthreadpool-d54565dd0056b4f07dfd77bbb74c41b4353bfd6a.tar.gz |
Support Emscripten
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 4b1e93f..75fa736 100755 --- a/configure.py +++ b/configure.py @@ -12,7 +12,11 @@ def main(args): build.export_cpath("include", ["pthreadpool.h"]) with build.options(source_dir="src", extra_include_dirs="src", deps=build.deps.fxdiv): - build.static_library("pthreadpool", build.cc("pthreadpool.c")) + if build.target.is_emscripten: + source = "threadpool-shim.c" + else: + source = "threadpool-pthreads.c" + build.static_library("pthreadpool", build.cc(source)) with build.options(source_dir="test", deps=[build, build.deps.googletest]): build.unittest("pthreadpool-test", build.cxx("pthreadpool.cc")) |