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

Use enable_language(HIP) #702

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

Conversation

davidbeckingsale
Copy link
Member

Inspired by #596 , but doesn't support hipcc

SetupBLT.cmake Outdated
CACHE STRING "List of known file extensions used for C/CXX sources")
set(BLT_C_FILE_EXTS ".c" ".h"
CACHE STRING "List of known file extensions used for C sources")
set(BLT_CXX_FILE_EXTS ".cpp" ".hpp" ".cxx" ".hxx" ".c" ".h" ".cc" ".hh" ".inl" ".cu" ".cuh"
Copy link
Member

Choose a reason for hiding this comment

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

Is it a problem if .c and .h are in both BLT_C_FILE_EXTS and BLT_CXX_FILE_EXTS?

Copy link
Member

Choose a reason for hiding this comment

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

It's looking like .c and .h will always be added to C_LIST regardless of whether CXX_LIST is defined.

Copy link
Member

Choose a reason for hiding this comment

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

Just for my own understanding: It shouldn't matter whether .h is in C_LIST or CXX_LIST, right? Or does the source language property matter for header files?

Copy link
Member Author

@davidbeckingsale davidbeckingsale Oct 14, 2024

Choose a reason for hiding this comment

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

Just a copy-paste error. The macro is backwards compatible, and the only difference is that the new CXX_LIST should only have C++ files in it since HIP is C++. CMake docs says: "Setting this property for a file means this file will be compiled, unless HEADER_FILE_ONLY is set."

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