{"action":"created","issue":{"url":"https://api.github.com/repos/waf-project/waf/issues/1771","repository_url":"https://api.github.com/repos/waf-project/waf","labels_url":"https://api.github.com/repos/waf-project/waf/issues/1771/labels{/name}","comments_url":"https://api.github.com/repos/waf-project/waf/issues/1771/comments","events_url":"https://api.github.com/repos/waf-project/waf/issues/1771/events","html_url":"https://github.com/waf-project/waf/issues/1771","id":166562413,"number":1771,"title":"Enabling support for list of targets for uselib_store for conf.check_c[xx] functions","user":{"login":"cyrilbouvier","id":20398893,"avatar_url":"https://avatars.githubusercontent.com/u/20398893?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrilbouvier","html_url":"https://github.com/cyrilbouvier","followers_url":"https://api.github.com/users/cyrilbouvier/followers","following_url":"https://api.github.com/users/cyrilbouvier/following{/other_user}","gists_url":"https://api.github.com/users/cyrilbouvier/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrilbouvier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrilbouvier/subscriptions","organizations_url":"https://api.github.com/users/cyrilbouvier/orgs","repos_url":"https://api.github.com/users/cyrilbouvier/repos","events_url":"https://api.github.com/users/cyrilbouvier/events{/privacy}","received_events_url":"https://api.github.com/users/cyrilbouvier/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-20T11:47:40Z","updated_at":"2016-07-26T15:11:03Z","closed_at":"2016-07-21T17:04:47Z","body":"Hi,\r\n\r\nI was wondering if it would be possible to enable support of multiple uselib_store for checking functions during configure. I would like to be able to write something like:\r\n\r\n`conf.check_cxx (header_name = \"time.h\", uselib_store = [ \"SET1\", \"SET2\" ])`\r\n\r\nIf I understand the code correctly, it would mean patching the function post_check in Tools/c_config.py.\r\n\r\nHere is a proposed patch:\r\n\r\ncurrent version:\r\n```\r\nif is_success and'uselib_store'in kw:\r\n\t\tfrom waflib.Tools import ccroot\r\n\t\t_vars=set([])\r\n\t\tfor x in kw['features']:\r\n\t\t\tif x in ccroot.USELIB_VARS:\r\n\t\t\t\t_vars|=ccroot.USELIB_VARS[x]\r\n\t\tfor k in _vars:\r\n\t\t\tx=k.lower()\r\n\t\t\tif x in kw:\r\n\t\t\t\tself.env.append_value(k+'_'+kw['uselib_store'],kw[x])\r\n```\r\n\r\nProposed changes:\r\n```\r\nif is_success and'uselib_store'in kw:\r\n            from waflib.Tools import ccroot\r\n            _vars=set([])\r\n            if not isinstance (kw['uselib_store'], list)\r\n                kw['uselib_store'] = [kw['uselib_store']]\r\n            for x in kw['features']:\r\n                if x in ccroot.USELIB_VARS:\r\n                     _vars|=ccroot.USELIB_VARS[x]\r\n            for k in _vars:\r\n                for store in kw['uselib_store']:\r\n                     x=k.lower()\r\n                     if x in kw:\r\n                         self.env.append_unique(k+'_'+store,kw[x])\r\n```\r\n\r\n[ I also changed the append_value to append_unique to avoid duplicates ]\r\n\r\nCyril"},"comment":{"url":"https://api.github.com/repos/waf-project/waf/issues/comments/235298993","html_url":"https://github.com/waf-project/waf/issues/1771#issuecomment-235298993","issue_url":"https://api.github.com/repos/waf-project/waf/issues/1771","id":235298993,"user":{"login":"cyrilbouvier","id":20398893,"avatar_url":"https://avatars.githubusercontent.com/u/20398893?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrilbouvier","html_url":"https://github.com/cyrilbouvier","followers_url":"https://api.github.com/users/cyrilbouvier/followers","following_url":"https://api.github.com/users/cyrilbouvier/following{/other_user}","gists_url":"https://api.github.com/users/cyrilbouvier/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrilbouvier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrilbouvier/subscriptions","organizations_url":"https://api.github.com/users/cyrilbouvier/orgs","repos_url":"https://api.github.com/users/cyrilbouvier/repos","events_url":"https://api.github.com/users/cyrilbouvier/events{/privacy}","received_events_url":"https://api.github.com/users/cyrilbouvier/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T15:11:03Z","updated_at":"2016-07-26T15:11:03Z","body":"There is no need to change the rest of the code. With the changes that I proposed you could still use both syntax: `uselib_store = \"SET1\" ` and `uselib_store = [ \"SET1\", \"SET2\" ]`.\r\n\r\n"}}
{"actor":{"display_login":"cyrilbouvier"}}