openmp.jam 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 2013 Karsten Ahnert
  2. # Copyright 2013 Mario Mulansky
  3. # Copyright 2013 Pascal Germroth
  4. # Distributed under the Boost Software License, Version 1.0. (See
  5. # accompanying file LICENSE_1_0.txt or copy at
  6. # http://www.boost.org/LICENSE_1_0.txt)
  7. # Only builds target with supported OpenMP enabled toolsets.
  8. #
  9. # use as:
  10. # exe omp : omp.cpp : [ openmp ] ;
  11. #
  12. rule openmp return
  13. # default
  14. <build>no
  15. # GNU C++
  16. <toolset>gcc:<cxxflags>-fopenmp
  17. <toolset>gcc:<linkflags>-fopenmp
  18. <toolset>gcc:<build>yes
  19. # Microsoft Visual C++
  20. <toolset>msvc:<cxxflags>/openmp
  21. <toolset>msvc:<linkflags>/openmp
  22. <toolset>msvc:<build>yes
  23. # Intel C++
  24. <toolset>intel-linux:<cxxflags>-openmp
  25. <toolset>intel-linux:<linkflags>-openmp
  26. <toolset>intel-linux:<build>yes
  27. <toolset>intel-win:<cxxflags>-Qopenmp
  28. <toolset>intel-win:<linkflags>-Qopenmp
  29. <toolset>intel-win:<build>yes
  30. # HP aC++
  31. <toolset>acc:<cxxflags>+Oopenmp
  32. <toolset>acc:<linkflags>+Oopenmp
  33. <toolset>acc:<build>yes
  34. # Sun Studio
  35. <toolset>sun:<cxxflags>-xopenmp
  36. <toolset>sun:<linkflags>-xopenmp
  37. <toolset>sun:<build>yes
  38. # IBM XL
  39. <toolset>vacpp:<cxxflags>-qsmp=omp
  40. <toolset>vacpp:<linkflags>-qsmp=omp
  41. <toolset>vacpp:<build>yes
  42. # PG++
  43. <toolset>pgi:<cxxflags>-mp
  44. <toolset>pgi:<linkflags>-mp
  45. <toolset>pgi:<build>yes
  46. # Pathscale
  47. <toolset>pathscale:<cxxflags>-mp
  48. <toolset>pathscale:<linkflags>-mp
  49. <toolset>pathscale:<build>yes
  50. ;