[Cs-dev] Config.h revisited
Date | 2013-10-23 00:36 |
From | Felipe Sateler |
Subject | [Cs-dev] Config.h revisited |
Hi, I've pushed an updated feature branch for creating a config.h file. A config.h has the following benefits: - No more adding definitions to each target - No more errors because defined in one target but not in other - No more defining USE_DOUBLE for API users The config.h gets installed alongside the rest of the header files. A drawback is that the file exposes the configuration defines for csound. Not sure if this is really important, my guess is not much. Should I merge? -- Saludos, Felipe Sateler ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-10-23 01:12 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Config.h revisited |
Attachments | None None |
What creates and maintains this file? Is it maintained by hand? I assume that CMake would use it. I would prefer that it be maintained by hand. I think it's basically a good idea. We have sysdep.h that is supposed to do some stuff like this, correct?
Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Oct 22, 2013 at 7:36 PM, Felipe Sateler <fsateler@gmail.com> wrote: Hi, |
Date | 2013-10-23 01:27 |
From | Steven Yi |
Subject | Re: [Cs-dev] Config.h revisited |
I haven't looked at the branch code and cmake changes but I'm in favor of the change in principle. I think it'll make the compiles less noisy and I like that the configuration is captured in a file to see. I'm pulling the branch now for a closer review and will reply again when I have chance to look through. On Tue, Oct 22, 2013 at 7:36 PM, Felipe Sateler |
Date | 2013-10-23 01:38 |
From | Steven Yi |
Subject | Re: [Cs-dev] Config.h revisited |
I looked through the commits and it looks good to me. One caveat is that the Android build does not use CMake. It may be tricky to ensure a separate custom Android config is used, but I'm sure some kind of solution can be done without too many problems. Otherwise, I think the CMake file looks leaner with the configure call and removing all the custom add_definitions. My vote is to go with the change, but would like to know other's opinions. One other thought: will configure.h be too generic a name? I think on Linux we install headers to /usr/local/include/csound, but on other systems the practice is to include the header folder directly. So we could do 1) use a different name or 2) modify sysdep.h to be a sysdep.h.in and move the configuration stuff into that header. On Tue, Oct 22, 2013 at 8:27 PM, Steven Yi |
Date | 2013-10-23 01:42 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Config.h revisited |
Attachments | None None |
It should be in a csound dir or be namned csound_config.h. As for android, it should be included. there are examples online adapting a configure script for NDK builds, but I think it can just be #included and maintained by hand.
Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Oct 22, 2013 at 8:38 PM, Steven Yi <stevenyi@gmail.com> wrote: I looked through the commits and it looks good to me. One caveat is |
Date | 2013-10-23 03:45 |
From | Felipe Sateler |
Subject | Re: [Cs-dev] Config.h revisited |
The file is maintained by specifying variables to be replaced by cmake according to the build configuration. So maintaining it by hand is not really feasible (some #defines need to be tested for!). What variables get defined can be decided, though. It is not just a dump of every variable known to cmake. As for android or ios, I didn't touch anything in those folders. I don't know how the c interop is in either platform. But I would think that the ios target for the library should be produced by the some cmake build, and then the mobile project points to the produced files? https://github.com/fsateler/csound/blob/feature/config-h/H/config.h.in On Tue, Oct 22, 2013 at 9:42 PM, Michael Gogins |
Date | 2013-10-23 03:51 |
From | Steven Yi |
Subject | Re: [Cs-dev] Config.h revisited |
For iOS, we use CMake to build libcsound.a. For Android, we use their NDK build system and we have our own separate build file. Where does the config.h get generated? If it is in the include folder, that will make it harder for us to override in the Android build. On Tue, Oct 22, 2013 at 10:45 PM, Felipe Sateler |
Date | 2013-10-23 12:12 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Config.h revisited |
Attachments | None None |
It's fine with me if it's only cmake that maintains it. Regards, On Oct 22, 2013 10:46 PM, "Felipe Sateler" <fsateler@gmail.com> wrote:
The file is maintained by specifying variables to be replaced by cmake |
Date | 2013-10-23 14:08 |
From | Felipe Sateler |
Subject | Re: [Cs-dev] Config.h revisited |
The config.h is generated in the build dir, but is installed into the include dir at install time. Both csound.h and csoundCore.h require config.h. A solution would be to have a hand-made config.h for android, but it would have to be kept in sync with the master one. On Tue, Oct 22, 2013 at 11:51 PM, Steven Yi |
Date | 2014-01-14 13:42 |
From | Steven Yi |
Subject | Re: [Cs-dev] Config.h revisited |
Hi All, I had this thread in my inbox for a while and wanted to followup on it. I thinking having a config.h would be nice, particularly as Felipe pointed out it would remove the necessity to use USE_DOUBLE by API applications (it would be already defined in the config.h). Thoughts? steven On Wed, Oct 23, 2013 at 9:08 AM, Felipe Sateler |
Date | 2014-01-14 14:27 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Config.h revisited |
Good idea. Victor On 14 Jan 2014, at 13:42, Steven Yi |
Date | 2014-01-14 14:52 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Config.h revisited |
I'll support anything that will make life easier for API developers :) On 14 January 2014 14:27, Victor Lazzarini |