-
Notifications
You must be signed in to change notification settings - Fork 55
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
Error when running 'cmake Unknown CMake command "build_static_extension".' #96
Comments
So I think I misunderstood how the build was working. Based on the duckdb docs it seems like the makefile is calling into the CMakeFile and adding the duckdb cmake functions. Is that correct? So how would I generate a compile_commands.json that includes my extra deps? |
yea that is correct, so if you run
So note that the duckdb submodule is the root of the CMake build, with the directory to the extension being passed through the How to configure this in your IDE will vary, the instructions for CLion are in the readme of the template: https://github.com/duckdb/extension-template?tab=readme-ov-file#setting-up-clion |
Thank you @samansmink for your insight. Personally, the CLion instructions never worked for me. I don't see what else I should do beside starting CLion in the It's more an annoyance than anything as the extension-template is a real timesaver otherwise. Having say that I'm curious to know if anyone actually managed to setup CLion successfully. |
@YoEight not sure if this helps but it looks like CLion primarily uses clangd as it's language server which is what I'm using with neovim as well. You might try generating a compile_commands.json [(clion instructions)] (https://www.jetbrains.com/help/clion/compilation-database.html) (although I used bear) and seeing if that fixes the missing header issues. @samansmink btw I just added the paths to the snowflake header file locations manually to the compile_commands.json and that seemed to fix the issues. At some point in the future I might try to figure out how to auto generate with the external deps included. |
I'm new to the C/C++ ecosystem so I apologize if I'm doing something wrong, but it seems like when I try to run CMake I get an error that the build_static_extension command is missing.
I see that the function exists in the duckdb CMake files, do I have to copy it over or somehow include that file?
The reason that I'm trying to run cmake is that I'm trying to write a snowflake extension and I statically linked in the snowflake c library in CMakeLists.txt. When I run make it seems to be picking up the library, but when I run bear to generate the compile_commands.json file it doesn't seem to be picking up the snowflake lib paths and my editor doesn't pick up the header files.
The text was updated successfully, but these errors were encountered: