Export Compile Command Issue | Can't Find Headers #387
-
I'm a bit new to CMake and have been following the Introduction Documentation utilizing the example However when adding the option SysInfo: CMakeLists.txtHaven't changed much aside from the tag and adding the flag. Also my main.cpp is an example from the documentation.
compile_commands.json
Is it because of firmlinks on macOS? CMake issue? Clang Issue? Did I configure something wrong? Think I've been chasing rabbits. If anymore information is needed please let me know and I'll update! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried your CMakeLists.txt on Linux: I was able to compile and execute "tui". I got compile_commands.json similar to yours: [
{
"directory": "/tmp/test/build",
"command": "/usr/bin/c++ -I/tmp/test/src -I/tmp/test/build/_deps/ftxui-src/include -std=gnu++17 -o CMakeFiles/tui.dir/src/main.cpp.o -c /tmp/test/src/main.cpp",
"file": "/tmp/test/src/main.cpp"
}
]
If I execute the command from an empty directory, I get:
However, if I execute the command from a directory, where "cmake" has been called, the commands works. Does this resolve your issue? |
Beta Was this translation helpful? Give feedback.
-
Oddly I was executing it from the dir I ran Anyways I deleted my other configured .json's, restarted, and then it worked. |
Beta Was this translation helpful? Give feedback.
I tried your CMakeLists.txt on Linux: I was able to compile and execute "tui".
I got compile_commands.json similar to yours:
If I execute the command from an empty directory, I get: