{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/64919286","id":64919286,"diff_hunk":"@@ -24,6 +24,29 @@\n # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n \n+function(add_spvtools_unittest target srcs libs)\n+  add_executable(${target} ${srcs})\n+  spvtools_default_compile_options(${target})\n+  if(${COMPILER_IS_LIKE_GNU})\n+    target_compile_options(${target} PRIVATE -Wno-undef)\n+  endif()\n+  if(${CMAKE_CXX_COMPILER_ID} STREQUAL \"MSVC\")\n+    # Disable C4503 \"decorated name length exceeded\" warning,\n+    # triggered by some heavily templated types.\n+    # We don't care much about that in test code.\n+    # Important to do since we have warnings-as-errors.\n+    target_compile_options(${target} PRIVATE /wd4503)\n+  endif()\n+  target_include_directories(${target} PRIVATE\n+    ${spirv-tools_SOURCE_DIR}\n+    ${gtest_SOURCE_DIR}/include\n+    ${gmock_SOURCE_DIR}/include\n+  )\n+  target_link_libraries(${target} PRIVATE ${libs})\n+  target_link_libraries(${target} PRIVATE gmock_main)\n+  add_test(NAME spvtools_${target} COMMAND ${target})","path":"test/CMakeLists.txt","position":24,"original_position":24,"commit_id":"4e460fab537dda55d149018f9a3c2f2fc3a673e0","original_commit_id":"4e460fab537dda55d149018f9a3c2f2fc3a673e0","user":{"login":"dneto0","id":13054574,"avatar_url":"https://avatars.githubusercontent.com/u/13054574?v=3","gravatar_id":"","url":"https://api.github.com/users/dneto0","html_url":"https://github.com/dneto0","followers_url":"https://api.github.com/users/dneto0/followers","following_url":"https://api.github.com/users/dneto0/following{/other_user}","gists_url":"https://api.github.com/users/dneto0/gists{/gist_id}","starred_url":"https://api.github.com/users/dneto0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dneto0/subscriptions","organizations_url":"https://api.github.com/users/dneto0/orgs","repos_url":"https://api.github.com/users/dneto0/repos","events_url":"https://api.github.com/users/dneto0/events{/privacy}","received_events_url":"https://api.github.com/users/dneto0/received_events","type":"User","site_admin":false},"body":"The test name is inconsistent with the old style. \r\nBefore we had spirv-tools-... and now its spvtools_\r\nI like the hyphen (I think we used that elsewhere too), and I like spelling out spirv-tools.\r\n","created_at":"2016-05-27T15:07:28Z","updated_at":"2016-05-27T15:07:28Z","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218#discussion_r64919286","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/64919286"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218#discussion_r64919286"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218","id":71320872,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218","diff_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/218","number":218,"state":"open","locked":false,"title":"Create a function for adding unittests in CMake.","user":{"login":"antiagainst","id":487928,"avatar_url":"https://avatars.githubusercontent.com/u/487928?v=3","gravatar_id":"","url":"https://api.github.com/users/antiagainst","html_url":"https://github.com/antiagainst","followers_url":"https://api.github.com/users/antiagainst/followers","following_url":"https://api.github.com/users/antiagainst/following{/other_user}","gists_url":"https://api.github.com/users/antiagainst/gists{/gist_id}","starred_url":"https://api.github.com/users/antiagainst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antiagainst/subscriptions","organizations_url":"https://api.github.com/users/antiagainst/orgs","repos_url":"https://api.github.com/users/antiagainst/repos","events_url":"https://api.github.com/users/antiagainst/events{/privacy}","received_events_url":"https://api.github.com/users/antiagainst/received_events","type":"User","site_admin":false},"body":"Also remove unnecessary main() function for unittests.","created_at":"2016-05-25T02:14:46Z","updated_at":"2016-05-27T15:07:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af1caef966a24cdd0a9e053506544db5912de6dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/218/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/4e460fab537dda55d149018f9a3c2f2fc3a673e0","head":{"label":"antiagainst:cmake-function","ref":"cmake-function","sha":"4e460fab537dda55d149018f9a3c2f2fc3a673e0","user":{"login":"antiagainst","id":487928,"avatar_url":"https://avatars.githubusercontent.com/u/487928?v=3","gravatar_id":"","url":"https://api.github.com/users/antiagainst","html_url":"https://github.com/antiagainst","followers_url":"https://api.github.com/users/antiagainst/followers","following_url":"https://api.github.com/users/antiagainst/following{/other_user}","gists_url":"https://api.github.com/users/antiagainst/gists{/gist_id}","starred_url":"https://api.github.com/users/antiagainst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antiagainst/subscriptions","organizations_url":"https://api.github.com/users/antiagainst/orgs","repos_url":"https://api.github.com/users/antiagainst/repos","events_url":"https://api.github.com/users/antiagainst/events{/privacy}","received_events_url":"https://api.github.com/users/antiagainst/received_events","type":"User","site_admin":false},"repo":{"id":46284705,"name":"SPIRV-Tools","full_name":"antiagainst/SPIRV-Tools","owner":{"login":"antiagainst","id":487928,"avatar_url":"https://avatars.githubusercontent.com/u/487928?v=3","gravatar_id":"","url":"https://api.github.com/users/antiagainst","html_url":"https://github.com/antiagainst","followers_url":"https://api.github.com/users/antiagainst/followers","following_url":"https://api.github.com/users/antiagainst/following{/other_user}","gists_url":"https://api.github.com/users/antiagainst/gists{/gist_id}","starred_url":"https://api.github.com/users/antiagainst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antiagainst/subscriptions","organizations_url":"https://api.github.com/users/antiagainst/orgs","repos_url":"https://api.github.com/users/antiagainst/repos","events_url":"https://api.github.com/users/antiagainst/events{/privacy}","received_events_url":"https://api.github.com/users/antiagainst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antiagainst/SPIRV-Tools","description":"","fork":true,"url":"https://api.github.com/repos/antiagainst/SPIRV-Tools","forks_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/antiagainst/SPIRV-Tools/deployments","created_at":"2015-11-16T15:47:34Z","updated_at":"2016-01-26T23:12:38Z","pushed_at":"2016-05-26T01:24:50Z","git_url":"git://github.com/antiagainst/SPIRV-Tools.git","ssh_url":"git@github.com:antiagainst/SPIRV-Tools.git","clone_url":"https://github.com/antiagainst/SPIRV-Tools.git","svn_url":"https://github.com/antiagainst/SPIRV-Tools","homepage":null,"size":1669,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KhronosGroup:master","ref":"master","sha":"c7551e1f0784f7c5096bf34bb005eee1491ab47f","user":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45981801,"name":"SPIRV-Tools","full_name":"KhronosGroup/SPIRV-Tools","owner":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools","description":"","fork":false,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools","forks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/deployments","created_at":"2015-11-11T12:56:25Z","updated_at":"2016-05-25T07:49:17Z","pushed_at":"2016-05-26T01:24:51Z","git_url":"git://github.com/KhronosGroup/SPIRV-Tools.git","ssh_url":"git@github.com:KhronosGroup/SPIRV-Tools.git","clone_url":"https://github.com/KhronosGroup/SPIRV-Tools.git","svn_url":"https://github.com/KhronosGroup/SPIRV-Tools","homepage":null,"size":2055,"stargazers_count":123,"watchers_count":123,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":13,"forks":30,"open_issues":13,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/218"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/218"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/4e460fab537dda55d149018f9a3c2f2fc3a673e0"}}}}
{"actor":{"display_login":"dneto0"}}