icc.py 600 B

1234567891011121314151617181920212223242526272829
  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. from waflib.Tools import ccroot, ar, gcc
  9. from waflib.Configure import conf
  10. @conf
  11. def find_icc(conf):
  12. """
  13. Finds the program icc and execute it to ensure it really is icc
  14. """
  15. cc = conf.find_program(['icx', 'icc', 'ICL'], var='CC')
  16. conf.get_cc_version(cc, icc=True)
  17. conf.env.CC_NAME = 'icc'
  18. def configure(conf):
  19. conf.find_icc()
  20. conf.find_ar()
  21. conf.gcc_common_flags()
  22. conf.gcc_modifier_platform()
  23. conf.cc_load_tools()
  24. conf.cc_add_flags()
  25. conf.link_add_flags()