{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/1850","repository_url":"https://api.github.com/repos/libuv/libuv","labels_url":"https://api.github.com/repos/libuv/libuv/issues/1850/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/1850/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/1850/events","html_url":"https://github.com/libuv/libuv/pull/1850","id":327042092,"number":1850,"title":"build: add a cmake build file","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars0.githubusercontent.com/u/275871?v=4","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-28T14:19:15Z","updated_at":"2018-05-28T22:36:23Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/libuv/libuv/pulls/1850","html_url":"https://github.com/libuv/libuv/pull/1850","diff_url":"https://github.com/libuv/libuv/pull/1850.diff","patch_url":"https://github.com/libuv/libuv/pull/1850.patch"},"body":"All good things come in threes and that's why besides autotools and gyp,\r\nyou can now also build everyone's favorite platform abstraction library\r\nwith cmake.\r\n\r\nThis is Ouroboros eating its own tail in a way because cmake depends on\r\nlibuv, depends on cmake, depends on libuv, depends on... inception!\r\n\r\nThings it does:\r\n\r\n* build the shared library\r\n* build the static library\r\n* install the shared library\r\n* install the static library\r\n* install the header files\r\n* install libuv.pc\r\n\r\nThings it does not yet do:\r\n\r\n* build or install the documentation\r\n* build or execute the test suite\r\n* produce a release tarball\r\n* provide auto-config for downstream cmake-based projects\r\n\r\nFixes: #1362\r\n\r\nThe last commit adds support for running tests through ctest(1).  It's not super fancy yet but it works."},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/392612462","html_url":"https://github.com/libuv/libuv/pull/1850#issuecomment-392612462","issue_url":"https://api.github.com/repos/libuv/libuv/issues/1850","id":392612462,"user":{"login":"piscisaureus","id":218257,"avatar_url":"https://avatars2.githubusercontent.com/u/218257?v=4","gravatar_id":"","url":"https://api.github.com/users/piscisaureus","html_url":"https://github.com/piscisaureus","followers_url":"https://api.github.com/users/piscisaureus/followers","following_url":"https://api.github.com/users/piscisaureus/following{/other_user}","gists_url":"https://api.github.com/users/piscisaureus/gists{/gist_id}","starred_url":"https://api.github.com/users/piscisaureus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piscisaureus/subscriptions","organizations_url":"https://api.github.com/users/piscisaureus/orgs","repos_url":"https://api.github.com/users/piscisaureus/repos","events_url":"https://api.github.com/users/piscisaureus/events{/privacy}","received_events_url":"https://api.github.com/users/piscisaureus/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T22:36:23Z","updated_at":"2018-05-28T22:36:23Z","author_association":"MEMBER","body":"As far as building is concerned - it bows out on not being able to find `tree.h`:\r\n\r\n```\r\nC:\\Users\\BertBelder\\d\\libuv2>cmake --build . --target run-tests\r\nMicrosoft (R) Build Engine version 15.7.177.53362 for .NET Framework\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nBuild started 5/28/2018 3:30:17 PM.\r\nProject \"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" on node 1 (default targets).\r\nProject \"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" (1) is building \"C:\\Users\\BertBelder\\d\\libuv2\\ZERO_CHECK.vcxpr\r\noj\" (2) on node 1 (default targets).\r\nInitializeBuildStatus:\r\n  Creating \"x64\\Debug\\ZERO_CHECK\\ZERO_CHECK.tlog\\unsuccessfulbuild\" because \"AlwaysCreate\" was specified.\r\nCustomBuild:\r\n  All outputs are up-to-date.\r\nFinalizeBuildStatus:\r\n  Deleting file \"x64\\Debug\\ZERO_CHECK\\ZERO_CHECK.tlog\\unsuccessfulbuild\".\r\n  Touching \"x64\\Debug\\ZERO_CHECK\\ZERO_CHECK.tlog\\ZERO_CHECK.lastbuildstate\".\r\nDone Building Project \"C:\\Users\\BertBelder\\d\\libuv2\\ZERO_CHECK.vcxproj\" (default targets).\r\n\r\nProject \"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" (1) is building \"C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj\" (3\r\n) on node 1 (default targets).\r\nInitializeBuildStatus:\r\n  Touching \"uv_a.dir\\Debug\\uv_a.tlog\\unsuccessfulbuild\".\r\nCustomBuild:\r\n  All outputs are up-to-date.\r\nClCompile:\r\n  C:\\Program Files (x86)\\Microsoft Visual Studio\\Preview\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\CL.exe /c\r\n   /IC:\\Users\\BertBelder\\d\\libuv2\\include /IC:\\Users\\BertBelder\\d\\libuv2\\src /Zi /nologo /W4 /WX- /diagnostics:classic\r\n  /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D WIN32_LEAN_AND_MEAN /D _WIN32_WINNT=0x0600 /D \"CMAKE_INTDIR=\\\"Debug\\\"\" /D\r\n  _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo\"uv_a.dir\\Debug\\\\\" /Fd\"uv_a.dir\\Debug\\uv\r\n  _a.pdb\" /Gd /TC /FC /errorReport:queue C:\\Users\\BertBelder\\d\\libuv2\\src\\win\\timer.c\r\n  timer.c\r\nc:\\users\\bertbelder\\d\\libuv2\\src\\win\\winapi.h(4152): warning C4201: nonstandard extension used: nameless struct/union [\r\nC:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\nc:\\users\\bertbelder\\d\\libuv2\\src\\win\\winapi.h(4160): warning C4201: nonstandard extension used: nameless struct/union [\r\nC:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\nc:\\users\\bertbelder\\d\\libuv2\\src\\win\\timer.c(27): fatal error C1083: Cannot open include file: 'tree.h': No such file o\r\nr directory [C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\nDone Building Project \"C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj\" (default targets) -- FAILED.\r\n\r\nDone Building Project \"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" (default targets) -- FAILED.\r\n\r\n\r\nBuild FAILED.\r\n\r\n\"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" (default target) (1) ->\r\n\"C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj\" (default target) (3) ->\r\n(ClCompile target) ->\r\n  c:\\users\\bertbelder\\d\\libuv2\\src\\win\\winapi.h(4152): warning C4201: nonstandard extension used: nameless struct/union\r\n [C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\n  c:\\users\\bertbelder\\d\\libuv2\\src\\win\\winapi.h(4160): warning C4201: nonstandard extension used: nameless struct/union\r\n [C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\n\r\n\r\n\"C:\\Users\\BertBelder\\d\\libuv2\\run-tests.vcxproj\" (default target) (1) ->\r\n\"C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj\" (default target) (3) ->\r\n(ClCompile target) ->\r\n  c:\\users\\bertbelder\\d\\libuv2\\src\\win\\timer.c(27): fatal error C1083: Cannot open include file: 'tree.h': No such file\r\n or directory [C:\\Users\\BertBelder\\d\\libuv2\\uv_a.vcxproj]\r\n\r\n    2 Warning(s)\r\n    1 Error(s)\r\n\r\nTime Elapsed 00:00:01.09\r\n```\r\n\r\nWhich can be solved with:\r\n\r\n```diff\r\ndiff --git a/src/win/timer.c b/src/win/timer.c\r\nindex 7e006fed..eda5c24f 100644\r\n--- a/src/win/timer.c\r\n+++ b/src/win/timer.c\r\n@@ -24,7 +24,7 @@\r\n\r\n #include \"uv.h\"\r\n #include \"internal.h\"\r\n-#include \"tree.h\"\r\n+#include \"uv/tree.h\"\r\n #include \"handle-inl.h\"\r\n```"}}
{"actor":{"display_login":"piscisaureus"}}