{"action":"created","issue":{"url":"https://api.github.com/repos/tboox/xmake/issues/83","repository_url":"https://api.github.com/repos/tboox/xmake","labels_url":"https://api.github.com/repos/tboox/xmake/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/tboox/xmake/issues/83/comments","events_url":"https://api.github.com/repos/tboox/xmake/issues/83/events","html_url":"https://github.com/tboox/xmake/issues/83","id":227569735,"number":83,"title":".cmake Adaptor?","user":{"login":"htfy96","id":8121231,"avatar_url":"https://avatars0.githubusercontent.com/u/8121231?v=3","gravatar_id":"","url":"https://api.github.com/users/htfy96","html_url":"https://github.com/htfy96","followers_url":"https://api.github.com/users/htfy96/followers","following_url":"https://api.github.com/users/htfy96/following{/other_user}","gists_url":"https://api.github.com/users/htfy96/gists{/gist_id}","starred_url":"https://api.github.com/users/htfy96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htfy96/subscriptions","organizations_url":"https://api.github.com/users/htfy96/orgs","repos_url":"https://api.github.com/users/htfy96/repos","events_url":"https://api.github.com/users/htfy96/events{/privacy}","received_events_url":"https://api.github.com/users/htfy96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-05-10T05:18:30Z","updated_at":"2017-05-11T07:19:51Z","closed_at":null,"body":"The main reason why I still stick to CMake is its [builtin modules](https://github.com/Kitware/CMake/tree/master/Modules) which provide compiler detection/package search/etc. It is unnecessary to reinvent the wheels, so I was wondering is it possible to provide (at least kind of) `.cmake` support and wrap these modules into `xmake` utilities?"},"comment":{"url":"https://api.github.com/repos/tboox/xmake/issues/comments/300704454","html_url":"https://github.com/tboox/xmake/issues/83#issuecomment-300704454","issue_url":"https://api.github.com/repos/tboox/xmake/issues/83","id":300704454,"user":{"login":"htfy96","id":8121231,"avatar_url":"https://avatars0.githubusercontent.com/u/8121231?v=3","gravatar_id":"","url":"https://api.github.com/users/htfy96","html_url":"https://github.com/htfy96","followers_url":"https://api.github.com/users/htfy96/followers","following_url":"https://api.github.com/users/htfy96/following{/other_user}","gists_url":"https://api.github.com/users/htfy96/gists{/gist_id}","starred_url":"https://api.github.com/users/htfy96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htfy96/subscriptions","organizations_url":"https://api.github.com/users/htfy96/orgs","repos_url":"https://api.github.com/users/htfy96/repos","events_url":"https://api.github.com/users/htfy96/events{/privacy}","received_events_url":"https://api.github.com/users/htfy96/received_events","type":"User","site_admin":false},"created_at":"2017-05-11T07:19:51Z","updated_at":"2017-05-11T07:19:51Z","body":"@waruqi \r\nThanks for detailed reply. One more question, how can I switch flags based on whether a code snippet can compile without error? For example, I want to detect constexpr support:\r\n\r\n```\r\noption(\"test_cxx11_constexpr\")\r\n    add_defines_if_ok(\"CXX11_CONSTEXPR\")\r\n    add_cxxfuncs(\"has_cxx11_constexpr{ constexpr int f(int x) { return x ? x+f(x-1) : 0; } constexpr int x = f(5); static_assert(x == 15); \")\r\n\r\noption(\"test_cxx14_constexpr\")\r\n    add_defines_if_ok(\"CXX14_CONSTEXPR\")\r\n    add_cxxfuncs(\"has_cxx14_constexpr{ constexpr int f(int x) { int sum=0; for (int i=0; i<=x; ++i) sum += i; return sum; } constexpr int x = f(5);  static_assert(x == 15);\")\r\n```\r\n\r\nThis doesn't seem to work."}}
{"actor":{"display_login":"htfy96"}}