{"action":"created","issue":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/999","repository_url":"https://api.github.com/repos/mesonbuild/meson","labels_url":"https://api.github.com/repos/mesonbuild/meson/issues/999/labels{/name}","comments_url":"https://api.github.com/repos/mesonbuild/meson/issues/999/comments","events_url":"https://api.github.com/repos/mesonbuild/meson/issues/999/events","html_url":"https://github.com/mesonbuild/meson/issues/999","id":187570527,"number":999,"title":"no include directories with precompiled headers ?","user":{"login":"trashuj","id":9165398,"avatar_url":"https://avatars.githubusercontent.com/u/9165398?v=3","gravatar_id":"","url":"https://api.github.com/users/trashuj","html_url":"https://github.com/trashuj","followers_url":"https://api.github.com/users/trashuj/followers","following_url":"https://api.github.com/users/trashuj/following{/other_user}","gists_url":"https://api.github.com/users/trashuj/gists{/gist_id}","starred_url":"https://api.github.com/users/trashuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trashuj/subscriptions","organizations_url":"https://api.github.com/users/trashuj/orgs","repos_url":"https://api.github.com/users/trashuj/repos","events_url":"https://api.github.com/users/trashuj/events{/privacy}","received_events_url":"https://api.github.com/users/trashuj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-06T16:09:04Z","updated_at":"2016-11-06T17:06:15Z","closed_at":null,"body":"Hi,\r\n\r\ni have a project structure tree that looks like:\r\nlib/\r\n&nbsp;&nbsp;&nbsp;&nbsp;inc\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lib\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lib.h\r\n&nbsp;&nbsp;&nbsp;&nbsp;src\r\n&nbsp;&nbsp;&nbsp;&nbsp;pch\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stdafx.h\r\napp/\r\n&nbsp;&nbsp;&nbsp;&nbsp;inc\r\n&nbsp;&nbsp;&nbsp;&nbsp;src\r\n&nbsp;&nbsp;&nbsp;&nbsp;pch\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stdafx.h\r\n\r\nwhat i do (maybe it's a bad idead?), is that I include all the headers in my lib inside lib.h.\r\nthat way, any app using that needs lib can just include lib/lib.h.\r\ni'm trying to use precompiled headers so that\r\nlib/pch/stdafx.h contains lib.h\r\napp/pch/stdafx.h also contains lib.h\r\n\r\nmeson.build for the app is setup like this:\r\nexecutable( 'app'\r\n            , src\r\n            , include_directories : [lib_inc]\r\n            , link_with : lib_lib\r\n            , cpp_pch : ['pch/stdafx.h', 'pch/stdafx.cpp'])\r\n\r\nproblem is when i'm compiling, i have this error:\r\nPrecompiling header ../app/pch/stdafx.h\r\nFAILED: app/app@exe/stdafx.h.pch \r\nclang++  \"-Wall\" \"-Winvalid-pch\" \"-Wnon-virtual-dtor\" \"-std=c++11\" \"-DWINDOWS\" \"-DIX_DEBUG\" \"-O0\" \"-g\" \"-MMD\" \"-MQ\" app/app@exe/stdafx.h.pch \"-MF\" \"app\\\\app@exe\\\\stdafx.h.pch.d\" -o app/app@exe/stdafx.h.pch -c ../app/pch/stdafx.h\r\nclang++.exe: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated\r\n../app/pch/stdafx.h:5:10: fatal error: 'lib/lib.h' file not found\r\n#include <lib/lib.h>\r\n\r\nseems to me that the include_directories doesnt apply to precompiled headers. is it expected?\r\nbonus: how can i get rid of the warning?\r\nnote that i'm running a meson.build script from the root directory, with subdir for lib and app.\r\n\r\nthanks a lot in advance,\r\nbest regards,\r\nUj\r\n"},"comment":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/comments/258694532","html_url":"https://github.com/mesonbuild/meson/issues/999#issuecomment-258694532","issue_url":"https://api.github.com/repos/mesonbuild/meson/issues/999","id":258694532,"user":{"login":"jpakkane","id":4079821,"avatar_url":"https://avatars.githubusercontent.com/u/4079821?v=3","gravatar_id":"","url":"https://api.github.com/users/jpakkane","html_url":"https://github.com/jpakkane","followers_url":"https://api.github.com/users/jpakkane/followers","following_url":"https://api.github.com/users/jpakkane/following{/other_user}","gists_url":"https://api.github.com/users/jpakkane/gists{/gist_id}","starred_url":"https://api.github.com/users/jpakkane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpakkane/subscriptions","organizations_url":"https://api.github.com/users/jpakkane/orgs","repos_url":"https://api.github.com/users/jpakkane/repos","events_url":"https://api.github.com/users/jpakkane/events{/privacy}","received_events_url":"https://api.github.com/users/jpakkane/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T17:06:15Z","updated_at":"2016-11-06T17:06:15Z","body":"The fact that includes are not used may be a bug. However it is strongly recommended that you don't include your own headers in pch, only those that come from \"the system\". If you change any header, it will trigger a recompilation of every source in your target, not just those that manually include just that one target."}}
{"actor":{"display_login":"jpakkane"}}