{"action":"opened","issue":{"url":"https://api.github.com/repos/tboox/xmake/issues/281","repository_url":"https://api.github.com/repos/tboox/xmake","labels_url":"https://api.github.com/repos/tboox/xmake/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/tboox/xmake/issues/281/comments","events_url":"https://api.github.com/repos/tboox/xmake/issues/281/events","html_url":"https://github.com/tboox/xmake/issues/281","id":389003580,"node_id":"MDU6SXNzdWUzODkwMDM1ODA=","number":281,"title":"設置--plat=mingw 的時候，warnings的指令出錯","user":{"login":"orzuk-lmj","id":7021113,"node_id":"MDQ6VXNlcjcwMjExMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/7021113?v=4","gravatar_id":"","url":"https://api.github.com/users/orzuk-lmj","html_url":"https://github.com/orzuk-lmj","followers_url":"https://api.github.com/users/orzuk-lmj/followers","following_url":"https://api.github.com/users/orzuk-lmj/following{/other_user}","gists_url":"https://api.github.com/users/orzuk-lmj/gists{/gist_id}","starred_url":"https://api.github.com/users/orzuk-lmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orzuk-lmj/subscriptions","organizations_url":"https://api.github.com/users/orzuk-lmj/orgs","repos_url":"https://api.github.com/users/orzuk-lmj/repos","events_url":"https://api.github.com/users/orzuk-lmj/events{/privacy}","received_events_url":"https://api.github.com/users/orzuk-lmj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-09T09:32:35Z","updated_at":"2018-12-09T09:32:35Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"以下都是透過rule加載。\r\n\r\n- 如果設置 `target:set(\"warnings\", \"all\")` 就可以正常運作\r\n- 但是如果設置其他選項，例如說 more/ less 都會造成錯誤。\r\n    ```\r\n    target:set(\"warnings\", \"more\")\r\n    error: g++: error: unrecognized command line option '-W3'; did you mean '-W'?\r\n \r\n    target:set(\"warnings\", \"less\")\r\n    error: g++: error: unrecognized command line option '-W1'; did you mean '-W'?\r\n    ```\r\n- 這個問題是在嘗試 `set_pcxxheader(\"private/PrecompiledHeader.h\")` 的時候發生的。一開始我設置了警告視同錯誤 target:set(\"warnings\", {\"all\", \"error\"})，就會發生底下的錯誤。\r\n    ```\r\n    [  0%]: compiling.debug PrecompiledHeader.h\r\n    error: PrecompiledHeader.h:18:9: error: #pragma once in main file [-Werror]\r\n    ```\r\n    PrecompiledHeader.h 的內容很簡單：\r\n    ``` cpp\r\n    #pragma once\r\n    #include <stdlib.h>\r\n    #include <stdio.h>\r\n    #include <iostream>\r\n    ```"}}
{"actor":{"display_login":"orzuk-lmj"}}