You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

6 years ago
  1. """engine.SCons.Tool.f08
  2. Tool-specific initialization for the generic Posix f08 Fortran compiler.
  3. There normally shouldn't be any need to import this module directly.
  4. It will usually be imported through the generic SCons.Tool.Tool()
  5. selection method.
  6. """
  7. from __future__ import absolute_import
  8. #
  9. # Copyright (c) 2001 - 2017 The SCons Foundation
  10. #
  11. # Permission is hereby granted, free of charge, to any person obtaining
  12. # a copy of this software and associated documentation files (the
  13. # "Software"), to deal in the Software without restriction, including
  14. # without limitation the rights to use, copy, modify, merge, publish,
  15. # distribute, sublicense, and/or sell copies of the Software, and to
  16. # permit persons to whom the Software is furnished to do so, subject to
  17. # the following conditions:
  18. #
  19. # The above copyright notice and this permission notice shall be included
  20. # in all copies or substantial portions of the Software.
  21. #
  22. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
  23. # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  24. # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. #
  30. __revision__ = "src/engine/SCons/Tool/f08.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
  31. import SCons.Defaults
  32. import SCons.Tool
  33. import SCons.Util
  34. from . import fortran
  35. from SCons.Tool.FortranCommon import add_all_to_env, add_f08_to_env
  36. compilers = ['f08']
  37. def generate(env):
  38. add_all_to_env(env)
  39. add_f08_to_env(env)
  40. fcomp = env.Detect(compilers) or 'f08'
  41. env['F08'] = fcomp
  42. env['SHF08'] = fcomp
  43. env['FORTRAN'] = fcomp
  44. env['SHFORTRAN'] = fcomp
  45. def exists(env):
  46. return env.Detect(compilers)
  47. # Local Variables:
  48. # tab-width:4
  49. # indent-tabs-mode:nil
  50. # End:
  51. # vim: set expandtab tabstop=4 shiftwidth=4: