{"action":"created","issue":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/2309","repository_url":"https://api.github.com/repos/supercollider/supercollider","labels_url":"https://api.github.com/repos/supercollider/supercollider/issues/2309/labels{/name}","comments_url":"https://api.github.com/repos/supercollider/supercollider/issues/2309/comments","events_url":"https://api.github.com/repos/supercollider/supercollider/issues/2309/events","html_url":"https://github.com/supercollider/supercollider/issues/2309","id":173597234,"number":2309,"title":"CMakeList.txt -DPRESET to make the build flags clearer and more flexible","user":{"login":"crucialfelix","id":218738,"avatar_url":"https://avatars.githubusercontent.com/u/218738?v=3","gravatar_id":"","url":"https://api.github.com/users/crucialfelix","html_url":"https://github.com/crucialfelix","followers_url":"https://api.github.com/users/crucialfelix/followers","following_url":"https://api.github.com/users/crucialfelix/following{/other_user}","gists_url":"https://api.github.com/users/crucialfelix/gists{/gist_id}","starred_url":"https://api.github.com/users/crucialfelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crucialfelix/subscriptions","organizations_url":"https://api.github.com/users/crucialfelix/orgs","repos_url":"https://api.github.com/users/crucialfelix/repos","events_url":"https://api.github.com/users/crucialfelix/events{/privacy}","received_events_url":"https://api.github.com/users/crucialfelix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/supercollider/supercollider/labels/comp:%20build","name":"comp: build","color":"CFFF7D"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-27T13:56:18Z","updated_at":"2016-08-27T17:51:47Z","closed_at":null,"body":"##  Proposal/RFC\r\n\r\nMake all of `-DSC_LANG_OFF` `-DSC_SUPERNOVA_OFF` `-DQT_OFF` etc. into simple binary switches that do no cascading logic. ie. none of them try to change any other binary switch.\r\n\r\nAdd `-DPRESET=sclang|sclang-noqt|scsynth|full|full-with-supernova` which are fixed presets that set each of the binary switches.\r\n\r\nEasy to add more presets, easy to write them, easy to read the code.\r\n\r\nYou either use a preset or you supply all the flags manually.\r\n\r\nThe preset can also specify a `COPY_STRATEGY`.  eg. for OS X the build will always use XCode to build it like an app, but then the copy strategy can specify one of many different folder structures that it will build for the Install:\r\n\r\n- Normal OS X SuperCollider.app\r\n- Normal full app linux folder structure\r\n- Normal full app windows folder structure\r\n- portable scsynth folder with scsynth, all plugins, libraries\r\n- portable sclang folder with sclang, class library\r\n- etc.\r\n\r\nThe copying phase thus can use a single variable COPY_STRATEGY and should not have to be consulting SC_LANG_OFF or whatever; no conditional statements other than branching on COPY_STRATEGY.  This should make each section very easy to read and reason about.\r\n"},"comment":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/comments/242931117","html_url":"https://github.com/supercollider/supercollider/issues/2309#issuecomment-242931117","issue_url":"https://api.github.com/repos/supercollider/supercollider/issues/2309","id":242931117,"user":{"login":"danstowell","id":202965,"avatar_url":"https://avatars.githubusercontent.com/u/202965?v=3","gravatar_id":"","url":"https://api.github.com/users/danstowell","html_url":"https://github.com/danstowell","followers_url":"https://api.github.com/users/danstowell/followers","following_url":"https://api.github.com/users/danstowell/following{/other_user}","gists_url":"https://api.github.com/users/danstowell/gists{/gist_id}","starred_url":"https://api.github.com/users/danstowell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danstowell/subscriptions","organizations_url":"https://api.github.com/users/danstowell/orgs","repos_url":"https://api.github.com/users/danstowell/repos","events_url":"https://api.github.com/users/danstowell/events{/privacy}","received_events_url":"https://api.github.com/users/danstowell/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T17:51:47Z","updated_at":"2016-08-27T17:51:47Z","body":"OK then, it seems to me this can be two separate proposals, which could in principle be accepted or rejected independently of each other: one is the presets, and one is that incompatible flags should throw errors rather than modifying each other. In principle I'm not against either of them.\r\n\r\nI'd be surprised if COPY_STRATEGY can be as comprehensive as you envision i.e. without _any_ checking of the other flags. For example, for every COPY_STRATEGY which includes supernova would there be one without supernova? That doesn't sound right. To me, those different copy strategies that you listed in the OP look like good general layouts which would then need to be adapted based on presence of supernova, host OS or whatever.\r\n\r\nSo with all that ^ I'm dubious about there being fewer if-statements afterwards. Anyway just my 2p"}}
{"actor":{"display_login":"danstowell"}}