gemini-code-assist[bot] commented on code in PR #418:
URL: https://github.com/apache/tvm-ffi/pull/418#discussion_r2706887948


##########
examples/cubin_launcher/embedded_cubin/cpp_embed/CMakeLists.txt:
##########
@@ -20,6 +20,14 @@ project(embedded_cubin_example LANGUAGES CXX CUDA)
 
 set(CMAKE_CXX_STANDARD 26)
 
+# Check for `#embed` after setting C++ standard, otherwise compilers (e.g. 
GCC) won't define the
+# macro.
+include(CheckCXXSymbolExists)
+check_cxx_symbol_exists(__cpp_pp_embed "" HAVE_EMBED)
+if (NOT HAVE_EMBED)
+  message(FATAL_ERROR "Compiler does not support `#embed`")
+endif ()

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The error message can be made more helpful for the user by providing more 
context about the feature and suggesting which compiler versions are known to 
support it. This will help users resolve build failures more quickly.
   
   ```
   if (NOT HAVE_EMBED)
     message(FATAL_ERROR "Compiler does not support C++23's #embed feature. 
Please use a newer compiler (e.g., GCC 14+, Clang 18+).")
   endif ()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to