{% set name = "ccache-toolchain" %}
{% set version = "1.0.0" %}

package:
  name: {{ name }}
  version: {{ version }}

build:
  number: 0

requirements:
  build:
    - ccache      # [unix]
  run:
    - ccache      # [unix]
    - toolchain 2.*

test:
  commands:
    # Verify the scripts are in-place.
    {% for state in ["activate", "deactivate"] %}
    - test -f "${PREFIX}/etc/conda/{{ state }}.d/ccache_toolchain_{{ state }}.sh"  # [unix]
    {% endfor %}
    {% for cc in ["gcc", "g++", "clang", "clang++", "gfortran"] %}
    # Verify that cc is in the path
    - test `which {{ cc }}` == "${PREFIX}/bin/conda_forge_ccache/{{ cc }}"         # [unix]
    # Verify that cc points to ccache
    - test `readlink -f \`which {{ cc }}\`` == "${PREFIX}/bin/ccache"              # [linux]
    {% endfor %}

about:
  home: https://github.com/conda-forge/ccache-toolchain-feedstock
  license: BSD 3-Clause
  summary: A meta-package to enable caching in CI using ccache.

extra:
  recipe-maintainers:
    - gqmelo
    - isuruf

{% set name = "ccache-toolchain" %}
{% set version = "1.0.0" %}

package:
  name: {{ name }}
  version: {{ version }}

build:
  number: 0

requirements:
  build:
    - ccache      # [unix]
  run:
    - ccache      # [unix]
    - toolchain 2.*

test:
  requires:
    - gcc         # [unix]
  commands:
    # Verify the scripts are in-place.
    {% for state in ["activate", "deactivate"] %}
    - test -f "${PREFIX}/etc/conda/{{ state }}.d/ccache_toolchain_{{ state }}.sh"  # [unix]
    {% endfor %}
    {% for cc in ["gcc", "g++", "clang", "clang++", "gfortran"] %}
    # Verify that cc is in the path
    - test `which {{ cc }}` == "${PREFIX}/bin/conda_forge_ccache/{{ cc }}"         # [unix]
    # Verify that cc points to ccache
    - test `readlink -f \`which {{ cc }}\`` == "${PREFIX}/bin/ccache"              # [linux]
    {% endfor %}
    - gcc --version        # [unix]
    - g++ --version        # [unix]
    - gfortran --version   # [unix]
    - clang --version      # [osx]
    - clang++ --version    # [osx]

about:
  home: https://github.com/conda-forge/ccache-toolchain-feedstock
  license: BSD 3-Clause
  summary: A meta-package to enable caching in CI using ccache.

extra:
  recipe-maintainers:
    - gqmelo
    - isuruf

Add tests running the compiler
Add tests running the compiler
