Re: [CMake] Resolution of dependencies for Subversion
On Sun, Sep 27, 2009 at 4:50 AM, SF Markus Elfring < elfr...@users.sourceforge.net> wrote: > > If you're asking if the module should find "svn.exe" if all you need > > is the subversion libraries, the answer is it doesn't have to. Once > > COMPONENTS have been specified the module can require the user > > specify one to find executables as well. FindImageMagick is a good > > example of this. It maintains backwards compatibility if COMPONENTS > > is not specified but otherwise requires each component that is to be > > searched for to be explicitly named regardless of it it is a program > > or a library. > > Thanks for your explanation. > > Can it be avoided to copy and paste source code from other configuration > scripts into the discussed update candidate? > Does a base class exist which provides the common functionality for path > searching and variable setting? > There are no classes in CMake script, only functions and macros. Searching for include directories and libraries is accomplished via the find_path and find_library commands, respectively. If a find modules has to call find_library more than once typically a function is employed via a foreach loop. > How many instructions have the available files got in common so that more > configuration code can be moved into base functions? > Most find modules are fairly simple but many of them have their quirks. I don't think there's a tremendous opportunity available to generalize what they do if you're asking, but it certainly is possible. The solution could also be in the form of new higher-level CMake commands. -- Philip Lowman ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
> If you're asking if the module should find "svn.exe" if all you need > is the subversion libraries, the answer is it doesn't have to. Once > COMPONENTS have been specified the module can require the user > specify one to find executables as well. FindImageMagick is a good > example of this. It maintains backwards compatibility if COMPONENTS > is not specified but otherwise requires each component that is to be > searched for to be explicitly named regardless of it it is a program > or a library. Thanks for your explanation. Can it be avoided to copy and paste source code from other configuration scripts into the discussed update candidate? Does a base class exist which provides the common functionality for path searching and variable setting? How many instructions have the available files got in common so that more configuration code can be moved into base functions? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
On Sat, Sep 26, 2009 at 5:10 PM, SF Markus Elfring < elfr...@users.sourceforge.net> wrote: > > You could look to FindImageMagick for inspiration. It started as a > > way to find the ImageMagick binary utilities like "convert" and " > > mogrify" but support was added to detect the ImageMagick libraries > > via specifying additional COMPONENTS. > > Thanks for your suggestion. > > I am also interested in another variation of this use case. > > Which name should a configuration script get that determines some > parameters for the build process and does not look for any client software? Generally the find module is named after the software package. Since usually a software package is either a library or a set of executables but not both, generally there is no ambiguity. Other CMake find modules have appended "Libs" to the module name. FindPerlLibs, for example. > How do you deal with the situation if further knowledge about available > utilities is not needed for the generation of project specific binaries? > If you're asking if the module should find "svn.exe" if all you need is the subversion libraries, the answer is it doesn't have to. Once COMPONENTS have been specified the module can require the user specify one to find executables as well. FindImageMagick is a good example of this. It maintains backwards compatibility if COMPONENTS is not specified but otherwise requires each component that is to be searched for to be explicitly named regardless of it it is a program or a library. Alternatively, you can simply write FindSubversionLibs and that will be that. -- Philip Lowman ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
> You could look to FindImageMagick for inspiration. It started as a > way to find the ImageMagick binary utilities like "convert" and " > mogrify" but support was added to detect the ImageMagick libraries > via specifying additional COMPONENTS. Thanks for your suggestion. I am also interested in another variation of this use case. Which name should a configuration script get that determines some parameters for the build process and does not look for any client software? How do you deal with the situation if further knowledge about available utilities is not needed for the generation of project specific binaries? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
You could look to FindImageMagick for inspiration. It started as a way to find the ImageMagick binary utilities like "convert" and "mogrify" but support was added to detect the ImageMagick libraries via specifying additional COMPONENTS. Not sure if this approach is completely correct for Subversion because it also seems to depend on APR. APR should probably be it's own find module that the Subversion one calls. E.g. find_package(Subversion COMPONENTS devel) (FindSubversion calls find_package(APR) and returns SUBVERSION_LIBRARIES which includes libsvn, libapr, etc. to the user) On Fri, Sep 25, 2009 at 11:20 AM, SF Markus Elfring < elfr...@users.sourceforge.net> wrote: > > Again, to me it looks like FindSubversion is for *using* Subversion, not > > for building it. As such, setting up include paths and link libraries is > > not appropriate in that module. > > Does a naming convention exist for configuration scripts? > How should names be distinguished between scripts which look only for the > availability of specific client software like the command "svn" and files > which determine all parameters for the build process to enable customised > software development? > > Regards, > Markus > ___ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- Philip Lowman ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
> Again, to me it looks like FindSubversion is for *using* Subversion, not > for building it. As such, setting up include paths and link libraries is > not appropriate in that module. Does a naming convention exist for configuration scripts? How should names be distinguished between scripts which look only for the availability of specific client software like the command "svn" and files which determine all parameters for the build process to enable customised software development? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
On Tue, Sep 22, 2009 at 10:57:14PM -0400, Philip Lowman wrote: > > http://fisheye.freeswitch.org/browse/FreeSWITCH/cmake_modules/FindAPRUtil.cmake > > > > If you want to use that FindAPRUtil module, you can drop it in your > > CMake modules directory (alongside the dozens of other Find*.cmake files > > in your CMake installation). You can also put it somewhere else and set > > CMAKE_PREFIX_PATH so that CMake can find it. > > > > I assume you meant to say CMAKE_MODULE_PATH. Yes of course. Thanks Philip. tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
On Tue, Sep 22, 2009 at 11:51 AM, Tyler Roscoe wrote: > On Tue, Sep 22, 2009 at 09:10:01AM +0200, SF Markus Elfring wrote: > > How are the chances that another improved script will be added to the > available modules? > > > http://fisheye.freeswitch.org/browse/FreeSWITCH/cmake_modules/FindAPRUtil.cmake > > If you want to use that FindAPRUtil module, you can drop it in your > CMake modules directory (alongside the dozens of other Find*.cmake files > in your CMake installation). You can also put it somewhere else and set > CMAKE_PREFIX_PATH so that CMake can find it. > I assume you meant to say CMAKE_MODULE_PATH. -- Philip Lowman ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
> Again, to me it looks like FindSubversion is for *using* Subversion, not > for building it. As such, setting up include paths and link libraries is > not appropriate in that module. How should a module be called which provides all required settings for the build process? > I'm not aware of a CMake Find module that helps with building > Subversion, but I've never looked for one. I am just looking around to find the corresponding software components. I wonder if it would not be available already. Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
On Tue, Sep 22, 2009 at 09:10:01AM +0200, SF Markus Elfring wrote: > I do not want to develop an add-on. But I would like to create a > little program for my own purposes that is based on the application > programming interface like it is described in the document "Using the > APIs - Chapter 8. Developer Information". > http://svnbook.red-bean.com/en/1.1/ch08s02.html That version of the svnbook is very old. Google likes to turn it up at the top of its hits, but I hope you're looking at a modern version for writing your program. > Would you like to recommend any ways to resolve the additional > software dependencies for the Apache Portable Runtime library? > FIND_PACKAGE(APR REQUIRED) > FIND_PACKAGE(APRUtil 1.3 REQUIRED) > > How are the chances that another improved script will be added to the > available modules? > http://fisheye.freeswitch.org/browse/FreeSWITCH/cmake_modules/FindAPRUtil.cmake If you want to use that FindAPRUtil module, you can drop it in your CMake modules directory (alongside the dozens of other Find*.cmake files in your CMake installation). You can also put it somewhere else and set CMAKE_PREFIX_PATH so that CMake can find it. If you are the author of that FindAPRUtil, you can try to get it officially included into CMake. Look here: http://www.itk.org/Wiki/CMake:Module_Maintainers > > If so, I don't think that's what FindSubversion is for. It looks like > > FindSubversion is for running the svn executable during builds in a > > CMake-friendly way. > > Its header contains the comment "Extract information from a subversion > working copy". Should the functionality be extended so that variables > will also be defined with the suffix "_INCLUDES" and "_LIBS" for > compiling and linking like they are provided by other scripts? Again, to me it looks like FindSubversion is for *using* Subversion, not for building it. As such, setting up include paths and link libraries is not appropriate in that module. I'm not aware of a CMake Find module that helps with building Subversion, but I've never looked for one. hth, tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
> You mean that you have FindSubversion.cmake as part of your > CMake installation? Yes. - The configuration script is a part of the package "cmake 2.6.4-29.2" from the openSUSE build service. > I don't see any variables defined with those names in the module you > linked above. What is the question here? Does a configuration script exist which will define all required variables and corresponding data structures for the build process? > Now I'm really confused. Are you trying to use CMake to build a > Subversion addon of some sort? I do not want to develop an add-on. But I would like to create a little program for my own purposes that is based on the application programming interface like it is described in the document "Using the APIs - Chapter 8. Developer Information". http://svnbook.red-bean.com/en/1.1/ch08s02.html Would you like to recommend any ways to resolve the additional software dependencies for the Apache Portable Runtime library? FIND_PACKAGE(APR REQUIRED) FIND_PACKAGE(APRUtil 1.3 REQUIRED) How are the chances that another improved script will be added to the available modules? http://fisheye.freeswitch.org/browse/FreeSWITCH/cmake_modules/FindAPRUtil.cmake > If so, I don't think that's what FindSubversion is for. It looks like > FindSubversion is for running the svn executable during builds in a > CMake-friendly way. Its header contains the comment "Extract information from a subversion working copy". Should the functionality be extended so that variables will also be defined with the suffix "_INCLUDES" and "_LIBS" for compiling and linking like they are provided by other scripts? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Resolution of dependencies for Subversion
On Mon, Sep 21, 2009 at 08:15:47PM +0200, SF Markus Elfring wrote: > A configuration script on my Linux system contains the following information. > # $Id: FindSubversion.cmake,v 1.2.2.3 2008-05-23 20:09:34 hoffman Exp $ > http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindSubversion.cmake?revision=1.4&root=CMake&view=markup You mean that you have FindSubversion.cmake as part of your CMake installation? Or something else? > I have got the impression that there will not be any variables defined with > the suffix "_INCLUDES" and "_LIBS". I would expect such names so that they > can be used for the commands "INCLUDE_DIRECTORIES" and "LINK_DIRECTORIES". > http://cmake.org/cmake/help/cmake2.6docs.html#command:include_directories I don't see any variables defined with those names in the module you linked above. What is the question here? > Subversion has got additional software dependencies like it is described in > the document "Using the APIs - Chapter 8. Developer Information". I have also > got some problems to get the commands "FIND_PACKAGE(APR REQUIRED)" and > "FIND_PACKAGE(APRUtil 1.3 REQUIRED)" to work so that the Apache Portable > Runtime library can be used as expected. > > Do any scripts need further improvements and fine-tuning? Now I'm really confused. Are you trying to use CMake to build a Subversion addon of some sort? If so, I don't think that's what FindSubversion is for. It looks like FindSubversion is for running the svn executable during builds in a CMake-friendly way. tyler ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Resolution of dependencies for Subversion
Hello! A configuration script on my Linux system contains the following information. # $Id: FindSubversion.cmake,v 1.2.2.3 2008-05-23 20:09:34 hoffman Exp $ http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindSubversion.cmake?revision=1.4&root=CMake&view=markup I have got the impression that there will not be any variables defined with the suffix "_INCLUDES" and "_LIBS". I would expect such names so that they can be used for the commands "INCLUDE_DIRECTORIES" and "LINK_DIRECTORIES". http://cmake.org/cmake/help/cmake2.6docs.html#command:include_directories Subversion has got additional software dependencies like it is described in the document "Using the APIs - Chapter 8. Developer Information". I have also got some problems to get the commands "FIND_PACKAGE(APR REQUIRED)" and "FIND_PACKAGE(APRUtil 1.3 REQUIRED)" to work so that the Apache Portable Runtime library can be used as expected. Do any scripts need further improvements and fine-tuning? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake