# Build HIP binaries on NVIDIA platform

**URL:** https://discourse.cmake.org/t/build-hip-binaries-on-nvidia-platform/7883
**Category:** Usage
**Tags:** os:linux, gen:makefiles
**Created:** [April 12, 2023, 7:18am UTC](https://discourse.cmake.org/t/build-hip-binaries-on-nvidia-platform/7883 "2023-04-12T07:18:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wme7](https://discourse.cmake.org/user_avatar/discourse.cmake.org/wme7/32/3336_2.png) [@wme7](https://discourse.cmake.org/u/wme7)
#### Post date: [April 12, 2023, 7:18am UTC](https://discourse.cmake.org/t/build-hip-binaries-on-nvidia-platform/7883/1 "2023-04-12T07:18:17Z")

</div>

I noted that since CMake 3.21, `hip` is a supported language in CMake. But I don’t seem to get it to work right when build bynaries (either executables or libraries) on **NVIDIA platforms**.

Perphasp, I’m not using the new CMake capabilities of `hip` language correctly 🤔

Is there anyone experienced that can give me a hint with this [sample project](https://www.reddit.com/r/cmake/comments/12iknc9/building_crossplataform_libraries_with_hip_in_c/)?

---

<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: [April 24, 2023, 5:04am UTC](https://discourse.cmake.org/t/build-hip-binaries-on-nvidia-platform/7883/2 "2023-04-24T05:04:02Z")

</div>

@zackgalbreath @robert.maynard

---

<div class="post-metadata">

### Author: ![wme7](https://discourse.cmake.org/user_avatar/discourse.cmake.org/wme7/32/3336_2.png) [@wme7](https://discourse.cmake.org/u/wme7)
#### Post date: [April 26, 2023, 1:19pm UTC](https://discourse.cmake.org/t/build-hip-binaries-on-nvidia-platform/7883/3 "2023-04-26T13:19:30Z")

</div>

Hi to all,

After scratching my head with this problem for the last two weeks. I managed to archive a simple working solution 😄

In [this example](https://github.com/wme7/devLibrary), I demonstrate my work around. I was not able to enable HIP as a language, but using a traditional approach, I was able to build truly cross-platform sample library, in either **NVIDIA** and **AMD** platforms with CMake \> 3.16 in a unified manner.

Nevertheless, I would appreciate any feedback/critic on this approach 🤔

best regards,  
Manuel
