{"action":"created","issue":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/923","repository_url":"https://api.github.com/repos/opensim-org/opensim-core","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/923/labels{/name}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/923/comments","events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/923/events","html_url":"https://github.com/opensim-org/opensim-core/pull/923","id":148097644,"number":923,"title":"Building OpenSim in less than a minute with unity build","user":{"login":"mitkof6","id":4024976,"avatar_url":"https://avatars.githubusercontent.com/u/4024976?v=3","gravatar_id":"","url":"https://api.github.com/users/mitkof6","html_url":"https://github.com/mitkof6","followers_url":"https://api.github.com/users/mitkof6/followers","following_url":"https://api.github.com/users/mitkof6/following{/other_user}","gists_url":"https://api.github.com/users/mitkof6/gists{/gist_id}","starred_url":"https://api.github.com/users/mitkof6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitkof6/subscriptions","organizations_url":"https://api.github.com/users/mitkof6/orgs","repos_url":"https://api.github.com/users/mitkof6/repos","events_url":"https://api.github.com/users/mitkof6/events{/privacy}","received_events_url":"https://api.github.com/users/mitkof6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-04-13T15:26:54Z","updated_at":"2016-04-24T22:10:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/923","html_url":"https://github.com/opensim-org/opensim-core/pull/923","diff_url":"https://github.com/opensim-org/opensim-core/pull/923.diff","patch_url":"https://github.com/opensim-org/opensim-core/pull/923.patch"},"body":"I tested building OpenSim using unity build. The libraries folder builds within 30s on my computer. There is a cmake function that can generate a single compilation unit containing all cpp files per library. I have added this option in the main cmake file so you can choose to build with unity build or without. Also, I have changed OpenSimAddLibrary function. Because all cpp files are included into a single cpp file, there were redefinition and ambiguous issues, which I tried to correct. It is possible to further speed up the compilation if we add all test*.cpp files into a single compilation unit, but I am not sure if there is a why to bypass multiple redefinition of the main function."},"comment":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments/214046432","html_url":"https://github.com/opensim-org/opensim-core/pull/923#issuecomment-214046432","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/923","id":214046432,"user":{"login":"chrisdembia","id":846001,"avatar_url":"https://avatars.githubusercontent.com/u/846001?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdembia","html_url":"https://github.com/chrisdembia","followers_url":"https://api.github.com/users/chrisdembia/followers","following_url":"https://api.github.com/users/chrisdembia/following{/other_user}","gists_url":"https://api.github.com/users/chrisdembia/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdembia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdembia/subscriptions","organizations_url":"https://api.github.com/users/chrisdembia/orgs","repos_url":"https://api.github.com/users/chrisdembia/repos","events_url":"https://api.github.com/users/chrisdembia/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdembia/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T22:10:29Z","updated_at":"2016-04-24T22:10:29Z","body":"@mitkof6 we discussed this PR recently, and we decided to not merge it. Some of the reasons were that we still would not feel comfortable using unity builds for continuous integration or distribution, and that it requires programmers to account for unnecessary constraints when writing their cpp files. Thanks for submitting the PR. We definitely want to improve build time, and we are definitely interested in other PRs that may improve build time (for example, using http://include-what-you-use.org/)."}}