{"action":"created","issue":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/303","repository_url":"https://api.github.com/repos/jemalloc/jemalloc","labels_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/303/comments","events_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/303/events","html_url":"https://github.com/jemalloc/jemalloc/issues/303","id":118217396,"number":303,"title":"Feature request: cmake support","user":{"login":"namreeb","id":5429489,"avatar_url":"https://avatars.githubusercontent.com/u/5429489?v=3","gravatar_id":"","url":"https://api.github.com/users/namreeb","html_url":"https://github.com/namreeb","followers_url":"https://api.github.com/users/namreeb/followers","following_url":"https://api.github.com/users/namreeb/following{/other_user}","gists_url":"https://api.github.com/users/namreeb/gists{/gist_id}","starred_url":"https://api.github.com/users/namreeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namreeb/subscriptions","organizations_url":"https://api.github.com/users/namreeb/orgs","repos_url":"https://api.github.com/users/namreeb/repos","events_url":"https://api.github.com/users/namreeb/events{/privacy}","received_events_url":"https://api.github.com/users/namreeb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jemalloc/jemalloc/labels/portability","name":"portability","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2015-11-21T19:49:10Z","updated_at":"2016-04-06T20:30:31Z","closed_at":null,"body":"CMake support would be wonderful for cross-platform support.  It would allow easy integration into existing cross-platform projects."},"comment":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/comments/206548145","html_url":"https://github.com/jemalloc/jemalloc/issues/303#issuecomment-206548145","issue_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/303","id":206548145,"user":{"login":"yuslepukhin","id":11303988,"avatar_url":"https://avatars.githubusercontent.com/u/11303988?v=3","gravatar_id":"","url":"https://api.github.com/users/yuslepukhin","html_url":"https://github.com/yuslepukhin","followers_url":"https://api.github.com/users/yuslepukhin/followers","following_url":"https://api.github.com/users/yuslepukhin/following{/other_user}","gists_url":"https://api.github.com/users/yuslepukhin/gists{/gist_id}","starred_url":"https://api.github.com/users/yuslepukhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuslepukhin/subscriptions","organizations_url":"https://api.github.com/users/yuslepukhin/orgs","repos_url":"https://api.github.com/users/yuslepukhin/repos","events_url":"https://api.github.com/users/yuslepukhin/events{/privacy}","received_events_url":"https://api.github.com/users/yuslepukhin/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T20:30:31Z","updated_at":"2016-04-06T20:30:31Z","body":"@jasone Got some time for properly implementing with-prefix option and I am hitting a problem while building test/src for JEMALLOC_UNIT_TEST. Fixed a few issues and now things generate identically to the reference build I have from autoconf. \r\n\r\nSo I define `mine_` prefix that goes into JEMALLOC_PREFIX\r\n\r\nThe main library, JET library and JEMALLOC_INTEGRATION_TEST build like a charm with JEMALLOC_MANGLE defined for the custom prefix.\r\n\r\nHowever, JEMALLOC_UNIT_TEST stumbles.\r\n\r\nc:\\dev\\oss\\jemalloc-cmake\\test\\src\\test.c(76): warning C4013: 'mine_nallocx' undefined; assuming extern returning int\r\n\r\nMeaning, the compilation is lacking a proper proto at that point although it correctly wants to refer the mangled symbol. The prototypes are renamed at the rename section at jemalloc.h but in this case renaming is disabled so we get the default protos with je_ prefix.\r\n\r\nI can not easily find what is missing in my build.\r\n\r\nThe sequence of includes appear to do the following (this is jemalloc-cmake)\r\n\r\ntest/jemalloc_test.h under JEMALLOC_UNIT_TEST  defines JEMALLOC_JET and JEMALLOC_MANGLE and go on to include jemalloc/internal/jemalloc_internal.h on line 75\r\n\r\nIn that header line 12 we go into JEMALLOC_JET section and define JEMALLOC_NO_RENAME before including public jemalloc.h. JEMALLOC_NO_RENAME disables renaming je_ to mine_ so protos remain with je_ and this results in the above compile error.\r\n\r\nWhat is missing?\r\n\r\n\r\n\r\n\r\n\r\n"}}