mitaki28 / vscode-clang

Completion and Diagnostic for C/C++/Objective-C using Clang
MIT License
128 stars 24 forks source link

'gtest/gtest.h' file not found #98

Closed jinyongp closed 3 years ago

jinyongp commented 3 years ago

I started gtest with this guide(GoogleTest Quickstart with CMake). (using FetchContent of CMake) To get the intelliSense for gtest, I set configurationProvider to ms-vscode.cmake-tools in c_cpp_properties.json.

Given that 'gtest/gtest.h' file not found error occurred, This extension seems to not accept the configuration. (Of course, there is no error when executing it because it is built with CMake.)

image

jinyongp commented 3 years ago

The issue was solved by adding an cxxflag -I${workspaceRoot}/build/_deps/googletest-src/googletest/include.