Add THREAD-SUPPORT feature when the host implementation supports threads.
[bordeaux-threads.git] / bordeaux-threads.asd
bloba3f9500ed27908af656d7e734bcddba5fd412723
1 #|
2 Copyright 2006,2007 Greg Pfeil
4 Distributed under the MIT license (see LICENSE file)
5 |#
7 (defpackage bordeaux-threads-system
8   (:use #:cl #:asdf))
10 (in-package :bordeaux-threads-system)
12 (eval-when (:compile-toplevel :load-toplevel :execute)
13   #+allegro (require :process)
14   #+corman  (require :threads))
16 (eval-when (:compile-toplevel :load-toplevel :execute)
17   #+(or (and allegro multiprocessing)
18         armedbear
19         (and cmu mp)
20         corman
21         (and digitool ccl-5.1)
22         (and ecl threads)
23         lispworks
24         (and openmcl openmcl-native-threads)
25         (and sbcl sb-thread))
26   (pushnew :thread-support *features*))
28 (defsystem bordeaux-threads
29   :description ""
30   :long-description ""
31   :author "Greg Pfeil <greg@technomadic.org>"
32   ;; based on original Bordeaux-MP spec by Dan Barlow <dan@telent.net>
33   ;; contributors:
34   ;; Attila Lendvai <attila.lendvai@gmail.com>
35   ;; - better handling of unsupported Lisps
36   ;; Vladimir Sekissov <svg@surnet.ru>
37   ;; - fixes for CMUCL implementation
38   ;; Pierre Thierry <nowhere.man@levallois.eu.org>
39   ;; - added license information
40   ;; Stelian Ionescu <sionescu@common-lisp.net>
41   ;; - finished conversion from generic functions
42   ;; - enabled running thread-safe code in unthreaded lisps
43   :licence "MIT"
44   :version "0.2.2"
45   :components ((:module "src"
46                         :serial t
47                         :components
48                         ((:file "bordeaux-threads")
49                          (:file #+(and thread-support allegro)   "allegro"
50                                 #+(and thread-support armedbear) "armedbear"
51                                 #+(and thread-support cmu)       "cmu"
52                                 #+(and thread-support corman)    "corman"
53                                 #+(and thread-support digitool)  "mcl"
54                                 #+(and thread-support ecl)       "ecl"
55                                 #+(and thread-support lispworks) "lispworks"
56                                 #+(and thread-support openmcl)   "openmcl"
57                                 #+(and thread-support sbcl)      "sbcl"
58                                 #-thread-support                 "unsupported")
59                          (:file "default-implementations")
60                          #+(and thread-support
61                                 (or armedbear ecl lispworks digitool))
62                          (:file "condition-variables"))))
63   :in-order-to ((test-op (load-op bordeaux-threads-test)))
64   :perform (test-op :after (op c)
65                     (describe
66                      (funcall
67                       (intern (symbol-name (read-from-string "run-tests"))
68                               :lift)
69                       :suite (intern
70                               (symbol-name
71                                (read-from-string "test-bordeaux-threads"))
72                               :bordeaux-threads-test)))))
74 (defmethod operation-done-p ((op test-op)
75                              (c (eql (find-system :bordeaux-threads))))
76   (values nil))
78 (defsystem bordeaux-threads-test
79   :depends-on (bordeaux-threads lift)
80   :components ((:module "test" :components ((:file "bordeaux-threads-test")))))