Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compatibility with projects using HIP language #443

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

lawruble13
Copy link
Collaborator

Previously if a project tried to include rocRAND via add_subdirectory, but was using the HIP language provided by CMake, this would fail (see rocThrust issue #238). This PR should enable rocRAND to be used in this fashion.

if( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
execute_process(COMMAND ${CMAKE_CXX_COMPILER} "--help"
OUTPUT_VARIABLE CXX_OUTPUT
if( CMAKE_${ROCRAND_LANG}_COMPILER MATCHES ".*/hipcc$" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hipcc cannot be used as the HIP language compiler.

Comment on lines +61 to +62
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
if(HIP IN_LIST ENABLED_LANGUAGES)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe just finish up #266 and suggest that users to set -DROCRAND_CMAKE_HIP_LANGUAGE=ON?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants