icpc.py 590 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy 2009-2018 (ita)
  4. """
  5. Detects the Intel C++ compiler
  6. """
  7. import sys
  8. from waflib.Tools import ccroot, ar, gxx
  9. from waflib.Configure import conf
  10. @conf
  11. def find_icpc(conf):
  12. """
  13. Finds the program icpc, and execute it to ensure it really is icpc
  14. """
  15. cxx = conf.find_program('icpc', var='CXX')
  16. conf.get_cc_version(cxx, icc=True)
  17. conf.env.CXX_NAME = 'icc'
  18. def configure(conf):
  19. conf.find_icpc()
  20. conf.find_ar()
  21. conf.gxx_common_flags()
  22. conf.gxx_modifier_platform()
  23. conf.cxx_load_tools()
  24. conf.cxx_add_flags()
  25. conf.link_add_flags()