-
Notifications
You must be signed in to change notification settings - Fork 432
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
Require Pass -iframework Options to C/C++ Extension #1178
Comments
What are the implications of the workaround (using compileCommands instead of configurationProvider)? Does this affect the extension's functionality at all? |
CMake Tools functionality is not affected at all, you can use this extension the same. What will be different is that with compile_commands.json, depending on the C/C++ source code complexity and the operations you are running on what symbols, IntelliSense may work less accurate than when configurationProvider is used, because the last one is designed to store more information that CppTools can use. But depending the source code and operations performed on it, they may both work the same. Another advantage for using configurationProvider is that it updates automatically when you change any CMake configure parameters (kit, variant, etc...). With compile_commands.json, you have to make sure you have an up-to-date one. Various settings or events may inhibit the creation of compile_commands. But you seem pretty experienced with it so I think you'll know how to ensure that compile_commands.json is used properly here. I think this workaround should be good enough for now. Let us know if you experience any other inconveniences because of this. |
I encountered the same issue. The workaround works except for the other problem - I had to set "cppStandard": "c++17" in c_cpp_properties.json despite the fact the "-std=c++17" flag is present in "compile_commands.json". Without the flag all Qt headers are parsed incorrectly. |
... still not working in 2023, the compile_commands workaround works, but it's something that cannot really be pushed to a repo (changing the build directory for instance will break it and it does not work with cppStandard and other cmake set variables)... |
CMake doesn't provide us the information we need to make it work. There's an issue open that you can go upvote. https://gitlab.kitware.com/cmake/cmake/-/issues/19897. I'm going to close this as a duplicate of #2324 where this was also discussed. |
See this issue:
microsoft/vscode-cpptools#3323 (comment)
macOS needs iframework option to help head files search, but with
"configurationProvider": "vector-of-bool.cmake-tools"
,cmake tool doesn't pass this option.I can only remove
"configurationProvider": "vector-of-bool.cmake-tools"
, and add"compileCommands": "${workspaceFolder}/build/compile_commands.json"
to work around.The text was updated successfully, but these errors were encountered: