diff --git a/.cache/clangd/index/Main.cpp.A7E5D4D12DB59CC0.idx b/.cache/clangd/index/Main.cpp.A7E5D4D12DB59CC0.idx new file mode 100644 index 0000000..3dcf34a Binary files /dev/null and b/.cache/clangd/index/Main.cpp.A7E5D4D12DB59CC0.idx differ diff --git a/.clangd b/.clangd deleted file mode 100644 index bec60b8..0000000 --- a/.clangd +++ /dev/null @@ -1,2 +0,0 @@ -CompileFlags: - Add: [-I/usr/include/gstreamer-1.0, -I/usr/include/glib-2.0, -I/usr/lib/x86_64-linux-gnu/glib-2.0/include] diff --git a/CMakeLists.txt b/CMakeLists.txt index cb3e51c..e9d9f93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.15) project(HelloWorld) +# compile_commands.json +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + set(CMAKE_CXX_STANDARD 14) set (source_dir "./src") diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..0cbfbda --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "/home/talksik/code/cpp_read_file_example/build", + "command": "/usr/bin/c++ -I/home/talksik/code/cpp_read_file_example/./src -g -std=gnu++14 -o CMakeFiles/HelloWorld.dir/src/Main.cpp.o -c /home/talksik/code/cpp_read_file_example/src/Main.cpp", + "file": "/home/talksik/code/cpp_read_file_example/src/Main.cpp" +} +] \ No newline at end of file diff --git a/run.sh b/run.sh index f4007fa..ff923d9 100755 --- a/run.sh +++ b/run.sh @@ -9,4 +9,7 @@ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. make +cp ./compile_commands.json ../ + ./HelloWorld +