{"action":"created","issue":{"url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/70","repository_url":"https://api.github.com/repos/atilaneves/cmake-ide","labels_url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/70/comments","events_url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/70/events","html_url":"https://github.com/atilaneves/cmake-ide/issues/70","id":169626298,"number":70,"title":"How to get rtags to include generated headers","user":{"login":"sbroberg","id":10091254,"avatar_url":"https://avatars.githubusercontent.com/u/10091254?v=3","gravatar_id":"","url":"https://api.github.com/users/sbroberg","html_url":"https://github.com/sbroberg","followers_url":"https://api.github.com/users/sbroberg/followers","following_url":"https://api.github.com/users/sbroberg/following{/other_user}","gists_url":"https://api.github.com/users/sbroberg/gists{/gist_id}","starred_url":"https://api.github.com/users/sbroberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbroberg/subscriptions","organizations_url":"https://api.github.com/users/sbroberg/orgs","repos_url":"https://api.github.com/users/sbroberg/repos","events_url":"https://api.github.com/users/sbroberg/events{/privacy}","received_events_url":"https://api.github.com/users/sbroberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-05T14:57:58Z","updated_at":"2016-08-22T17:30:49Z","closed_at":null,"body":"I have a OSX project that is using an IDL to generate cpp & h files in my build space (Google's grpc).  Using cmake-ide with the default configuration results in the compile-commands.json being generated in the /tmp directory, which of course doesn't have the generated files in it (since make hasn't been run in that space).\r\n\r\nI tried setting cmake-ide-build-dir to my build directory (located in /Users/stebro/MyProject/build), and I see in the \\*cmake\\* buffer that it is using that directory, but no compile-commands.json is generated in that space, likely because we're using XCode as our build system, so there is no Makefile in that directory, just XCode project files.\r\n\r\nI also tried setting cmake-ide-flags-c++ to \"\"-I/Users/stebro/MyProject/build/lib/Debug/include -I/Users/stebro/MyProject/build/Daemon/RemoteClient\" (the two include paths that have the generated header files), but apparently that variable is not passed into rtags/rdm (the cmake-ide docs do say that it's only used by ac-clang-flags).\r\n\r\nWhat's the best approach to getting rtags/rdm to see include in the build space of your project?"},"comment":{"url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/comments/241487748","html_url":"https://github.com/atilaneves/cmake-ide/issues/70#issuecomment-241487748","issue_url":"https://api.github.com/repos/atilaneves/cmake-ide/issues/70","id":241487748,"user":{"login":"sbroberg","id":10091254,"avatar_url":"https://avatars.githubusercontent.com/u/10091254?v=3","gravatar_id":"","url":"https://api.github.com/users/sbroberg","html_url":"https://github.com/sbroberg","followers_url":"https://api.github.com/users/sbroberg/followers","following_url":"https://api.github.com/users/sbroberg/following{/other_user}","gists_url":"https://api.github.com/users/sbroberg/gists{/gist_id}","starred_url":"https://api.github.com/users/sbroberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbroberg/subscriptions","organizations_url":"https://api.github.com/users/sbroberg/orgs","repos_url":"https://api.github.com/users/sbroberg/repos","events_url":"https://api.github.com/users/sbroberg/events{/privacy}","received_events_url":"https://api.github.com/users/sbroberg/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T17:30:49Z","updated_at":"2016-08-22T17:30:49Z","body":"I don't think the problem is with cmake-ide per se, but with how cmake works.  If I run\r\n    mkdir /tmp/foo\r\n    cd /tmp/foo\r\n    cmake ~/myProject\r\n\r\nand then later run\r\n    cd /tmp/foo\r\n    cmake ~/myProject -DCMAKE_EXPORT_COMPILE_COMMANDS=1\r\n\r\nI see the .json file appear.  However, if I first run (as we do in our build setup):\r\n    cd /tmp/foo\r\n    cmake -G Xcode\r\n\r\nand then later run \r\n    cd /tmp/foo\r\n    cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1\r\n\r\nit does not generate the .json file.  Running the second command with \"-G Xcode\" doesn't work either.  The requirement to be running cmake with -G Xcode is coming from our build team, who want all developers, whether using Xcode or not, to be building the same way.\r\n\r\nI suppose I can get around this by doing a build in a special location (e.g., ~/MyProject-cmake-ide), and then point cmake-ide at that location.  The generated files would eventually become stale and I'd have to rebuild, but it's better than nothing."}}
{"actor":{"display_login":"sbroberg"}}