icc.py 604 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # Stian Selnes 2008
  4. # Thomas Nagy 2009-2018 (ita)
  5. """
  6. Detects the Intel C compiler
  7. """
  8. import sys
  9. from waflib.Tools import ccroot, ar, gcc
  10. from waflib.Configure import conf
  11. @conf
  12. def find_icc(conf):
  13. """
  14. Finds the program icc and execute it to ensure it really is icc
  15. """
  16. cc = conf.find_program(['icc', 'ICL'], var='CC')
  17. conf.get_cc_version(cc, icc=True)
  18. conf.env.CC_NAME = 'icc'
  19. def configure(conf):
  20. conf.find_icc()
  21. conf.find_ar()
  22. conf.gcc_common_flags()
  23. conf.gcc_modifier_platform()
  24. conf.cc_load_tools()
  25. conf.cc_add_flags()
  26. conf.link_add_flags()