spack/lib/spack
Massimiliano Culpo a1255b61c0 Added tests on compiler's version detection (#10931)
* Split get_compiler_version into two functions:
  get_compiler_version_output runs the compiler with the relevant
  option to print the version; extract_version_from_output determines
  the version by examining this output. This makes it easier to test
  the customized version detection for each compiler. Users can
  customize this by overriding the following:
  * version_argument: this is the argument that tells the compiler to
    print its version. It assumes that the compiler will report its
	version if invoked with a single option (like "--version")
  * version_regex: the regular expression used to extract the version
    from the compiler argument. This assumes that a regular
	expression is sufficient to extract the version, and that the
	version can be extracted from a single capture group (Spack uses
	the first capture group)
  * default_version: allows you to completely override all version
    detection logic
  * get_compiler_version_output: if getting the compiler to report
    its version is more complex than invoking it with a single arg
  * extract_version_from_output: if it is difficult to define a regex
    that can be used to extract the version from the output
* Added tests for version detection of most compilers
* Removed redundant code from xl_r compiler class (by inheriting
  from xl compiler definition)
2019-04-02 12:52:47 -07:00
..
docs typo in documentation (#10976) 2019-03-21 14:29:40 -05:00
env Use Package.headers for -I options (#10623) 2019-02-26 12:42:30 -06:00
external copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
llnl Update llnl.util.lang.memoized so that Sphinx can extract signature (#11055) 2019-03-29 17:11:44 -07:00
spack Added tests on compiler's version detection (#10931) 2019-04-02 12:52:47 -07:00