# \[feature request\] a cross platform find GNU GCC macro

**URL:** <https://discourse.cmake.org/t/feature-request-a-cross-platform-find-gnu-gcc-macro/3017>\
**Category:** Code\
**Tags:** comp:gcc\
**Created:** [March 25, 2021, 10:16am UTC](https://discourse.cmake.org/t/feature-request-a-cross-platform-find-gnu-gcc-macro/3017 "2021-03-25T10:16:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsffarimani](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/f1d935/32.png) [@fsffarimani](https://discourse.cmake.org/u/fsffarimani)\
**Post date:** [March 25, 2021, 10:16am UTC](https://discourse.cmake.org/t/feature-request-a-cross-platform-find-gnu-gcc-macro/3017/1 "2021-03-25T10:16:10Z")

</div>

Following [this discussion](https://github.com/ElmerCSC/elmerfem/issues/199#issuecomment-804070759), we have the issue that we can’t find the GNU GCC (gcc, g++, and gfortran) installed via HomeBrew on macOS. There might some temporary workaround for this specific issue, but it would be great if we could have a script/macro (e.g., findGCC.cmake) that would fine the GNU compilers automatically. Thanks for your kind support in advance.

---

<div class="post-metadata">

**Author:** ![fsffarimani](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/f1d935/32.png) [@fsffarimani](https://discourse.cmake.org/u/fsffarimani)\
**Post date:** [March 25, 2021, 10:16am UTC](https://discourse.cmake.org/t/feature-request-a-cross-platform-find-gnu-gcc-macro/3017/2 "2021-03-25T10:16:54Z")

</div>

This is a duplicate of [this feature request](https://gitlab.kitware.com/cmake/cmake/-/issues/21976) on CMake GitLab.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [March 25, 2021, 6:24pm UTC](https://discourse.cmake.org/t/feature-request-a-cross-platform-find-gnu-gcc-macro/3017/3 "2021-03-25T18:24:28Z")

</div>

Why are the Homebrew compilers not available in PATH? IIRC, brew has ways to “activate” packages to make them available in Homebrew’s prefix. That is how I would manage this at least.
