Re: [CMake] CMake and portable dynamic library loading?
Original-Nachricht Datum: Mon, 16 Oct 2006 11:24:58 -0700 (PDT) Von: "Alan W. Irwin" <[EMAIL PROTECTED]> An: Alexander Neundorf <[EMAIL PROTECTED]> Betreff: Re: [CMake] CMake and portable dynamic library loading? > On 2006-10-01 19:01+0200 Alexander Neundorf wrote: > > > > > Original-Nachricht > > Datum: Sun, 1 Oct 2006 13:00:23 +0600 > > Von: Andrey Rahmatullin <[EMAIL PROTECTED]> > > An: cmake@cmake.org > > Betreff: Re: [CMake] CMake and portable dynamic library loading? > > > >> On Sat, Sep 30, 2006 at 08:34:58AM -0700, Alan W. Irwin wrote: > >>> However, libltdl does not solve the issue of how to dynamically load > >>> plug-ins on windows systems. > >> SIM always used libltdl on all platforms without problems (until we > >> switched to QLibrary). > > > > The same for KDE. > > We are using now cmake and until some days ago libltdl, since some days > we switched to QLibrary. > > We even created fake libtool-la files. > > > Hi Alex: > > The PLplot windows developers are beginning to try libltdl now but they > have > run into an issue which is it is available on Cygwin but doesn't seem to > be > widely available in binary form on bare windows platforms. The obvious > solution is to build it internally. When KDE used this library was that > the > option chosen? If so, could you point me to the CMake files used to build > libltdl? That would save our project some time since I assume there are > lots > of platform-dependent linking issues (since libltdl is simply a wrapper > with > uniform API for whatever platform library is used to do dynamic loading). Get trunk/KDE/kdelibs/ from some time ago, e.g. june. Then have a look at kdelibs/kdecore/CMakeLists.txt, I think it is (was) compiled into libkdecore. There are a bunch of configure checks in kdelibs/ConfigureChecks.cmake. If you have more questions, feel free to aks :-) Bye Alex -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to check/set CMAKE_INSTALL_PREFIX
Original-Nachricht Datum: Mon, 16 Oct 2006 14:02:28 -0400 Von: Brad King <[EMAIL PROTECTED]> An: Eric Noulard <[EMAIL PROTECTED]> Betreff: Re: [CMake] How to check/set CMAKE_INSTALL_PREFIX > Eric Noulard wrote: > > What is the good way to change the default value of CMAKE_INSTALL_PREFIX > > besides the usual: > > This question has come up several times and I've been deferring a fix > until a project-specified initial cache feature is implemented. That > feature has been delayed because it is tricky. > > I've just added a fix to CVS CMake for this. It will be in 2.4.4 (the > upcoming patch release). Basically your code needs to know whether the > current value of CMAKE_INSTALL_PREFIX was set by the user on the command > line or initialized by CMake. Now when CMake initializes the variable > it also sets CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT to true. This Does it do this for all internal cmake variables or only for CMAKE_INSTALL_PREFIX ? Bye Alex -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and portable dynamic library loading?
Andrey said: On Mon, Oct 16, 2006 at 11:24:58AM -0700, Alan W. Irwin wrote: The obvious solution is to build it internally. When KDE used this library was that the option chosen? True for SIM. If so, could you point me to the CMake files used to build libltdl? We switched from libltdl prior to using cmake, but Makefile.am for it was pretty simple: noinst_HEADERS = ltdl.h noinst_LTLIBRARIES = libltdl.la CLEANFILES = libltdl.la libltdl_la_SOURCES = ltdl.c libltdl_la_LIBADD = $(LIBADD_DL) Thanks for that information which (God help me) I still understand from my knowledge of the old autotools build system for PLplot. Clearly, libltdl is straightforward to build once you have configured the libraries that it wraps for a given platform. But that is the key question; for the above Makefile.am fragment that information is hidden in $(LIBADD_DL). I am having considerable difficulty trying to understand the m4 language in acinclude.m4 that determines LIBADD_DL. So if some project has already done all the necessary cross-platform library configuration of libltdl in the CMake language I would be grateful if somebody in the know for that project (e.g., Alex for KDE) would share that information. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and portable dynamic library loading?
On Mon, Oct 16, 2006 at 11:24:58AM -0700, Alan W. Irwin wrote: > The obvious solution is to build it internally. When KDE used this > library was that the option chosen? True for SIM. > If so, could you point me to the CMake files used to build libltdl? We switched from libltdl prior to using cmake, but Makefile.am for it was pretty simple: noinst_HEADERS = ltdl.h noinst_LTLIBRARIES = libltdl.la CLEANFILES = libltdl.la libltdl_la_SOURCES = ltdl.c libltdl_la_LIBADD = $(LIBADD_DL) -- WBR, wRAR (ALT Linux Team) Captain: Uh... sorry about that little mistake... we thought we had gotten all of those creatures. Spathi High Council: That was not a little mistake. A little mistake is leaving the top off the eye cream or forgetting to clean your lid in the morning. Now on the other hand, a big mistake might be, say telling your friends that a certain place is safe when in fact it is crawling with hideous, hungry beasts who want nothing more than to feast on soft, Spathi flesh! That's a big mistake. signature.asc Description: Digital signature ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Cmake + Matlab mex
Brad King wrote: FIND_PACKAGE(Matlab) INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR}) ADD_LIBRARY(mymex MODULE mymex.c) TARGET_LINK_LIBRARIES(mymex ${MATLAB_LIBRARIES}) See also "bin/cmake --help-module FindMatlab". It looks like the matlab module is a bit out of date so let us know if you have problems. -Brad I think maybe I didn't explain my question well enough. It seems that your suggestion would allow me to compile a c/cpp file against the matlab mex library, but what I want to do is compile a file for use in Matlab using the mex compiler. I can do this by hand by executing the following in a shell: $ mex foo.cpp This would produce a foo.mexglx binary which matlab would be able to use. This is great if your foo.cpp is self-contained, however my foo.cpp depends on libraries and include files which I generate in my CMake build. Manually what I would do to handle this is: $ mex -I/my/include/path -L/my/library/path -lmylib ... foo.cpp I would like to make a CMake target which does the command above, taking into account any library or include dependencies I specify in my CMakeLists.txt. Is this possible? Thanks, -wojciech ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Cmake + Matlab mex
Wojciech Jarosz wrote: > I saw a couple questions regarding this in the archives from a few > years, but no answers. > > I am using CMake for my project, and would now like to write a matlab > mex function which would use my C/C++ code base. I'd like to have the > CMake infrastructure figure out the correct -I,-L,-l flags to pass to > the mex compiler so everything compiles/links correctly. Has anyone done > this before? I'm primarily using Linux. FIND_PACKAGE(Matlab) INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR}) ADD_LIBRARY(mymex MODULE mymex.c) TARGET_LINK_LIBRARIES(mymex ${MATLAB_LIBRARIES}) See also "bin/cmake --help-module FindMatlab". It looks like the matlab module is a bit out of date so let us know if you have problems. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] ctest with SSL?
Is there a way to enable SSL in CTest? When I use 'https' URL, I get curl_easy_perform() says: libcurl was built with SSL disabled[...] Thank You. -- Artur Kedzierski smime.p7s Description: S/MIME cryptographic signature ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] example of ctest --build-and-test
At 12:14 PM 10/16/2006, Luigi Calori wrote: >I have the following problem: >a master cmake project that wants to configure and build a series of slave >cmake projects >I' ve tried several hacking but not found an elegant solution. >I' ve read from the list that the > >ctest --build-and-test > > >could be used for that but did not found any example: any suggestion? >The main reason for such a request is that I would like to have targets that >download from CVS,configure and build projects, so to >use the master build phase as a kind of interface to all the tedious step of >grabbibg things from the net, configuring and building. >Are there any examples ? The best example is in CMake itself. In Source/CMakeLists.txt, all of the tests for cmake are run with this command. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to check/set CMAKE_INSTALL_PREFIX
On 2006-10-16 18:22+0200 Eric Noulard wrote: Hi all, I want to setup a default value for CMAKE_INSTALL_PREFIX if the user did not indicate a value. so I put: IF (NOT CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/opt/${PACKAGE_NAME}-${PACKAGE_VERSION}" CACHE PATH "Install path prefix" FORCE) ELSE (NOT CMAKE_INSTALL_PREFIX) MESSAGE("CMAKE_INSTALL_PREFIX already set to: ${CMAKE_INSTALL_PREFIX}") ENDIF (NOT CMAKE_INSTALL_PREFIX) but is seems that CMAKE_INSTALL_PREFIX is always set in cache BEFORE I test this :(( Try dropping the Boolean logic and FORCE. i.e., use just SET(CMAKE_INSTALL_PREFIX "/opt/${PACKAGE_NAME}-${PACKAGE_VERSION}" CACHE PATH "Install path prefix") That style works for us to provide a default option that can be changed by the user. I assume that style will also work to override a variable that has already been cached, but I don't know for sure. Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Cmake + Matlab mex
I saw a couple questions regarding this in the archives from a few years, but no answers. I am using CMake for my project, and would now like to write a matlab mex function which would use my C/C++ code base. I'd like to have the CMake infrastructure figure out the correct -I,-L,-l flags to pass to the mex compiler so everything compiles/links correctly. Has anyone done this before? I'm primarily using Linux. Thanks! -wojciech ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and portable dynamic library loading?
On 2006-10-01 19:01+0200 Alexander Neundorf wrote: Original-Nachricht Datum: Sun, 1 Oct 2006 13:00:23 +0600 Von: Andrey Rahmatullin <[EMAIL PROTECTED]> An: cmake@cmake.org Betreff: Re: [CMake] CMake and portable dynamic library loading? On Sat, Sep 30, 2006 at 08:34:58AM -0700, Alan W. Irwin wrote: However, libltdl does not solve the issue of how to dynamically load plug-ins on windows systems. SIM always used libltdl on all platforms without problems (until we switched to QLibrary). The same for KDE. We are using now cmake and until some days ago libltdl, since some days we switched to QLibrary. We even created fake libtool-la files. Hi Alex: The PLplot windows developers are beginning to try libltdl now but they have run into an issue which is it is available on Cygwin but doesn't seem to be widely available in binary form on bare windows platforms. The obvious solution is to build it internally. When KDE used this library was that the option chosen? If so, could you point me to the CMake files used to build libltdl? That would save our project some time since I assume there are lots of platform-dependent linking issues (since libltdl is simply a wrapper with uniform API for whatever platform library is used to do dynamic loading). Thanks in advance, Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] example of ctest --build-and-test
Luigi Calori wrote: > I have the following problem: > a master cmake project that wants to configure and build a series of > slave cmake projects > I' ve tried several hacking but not found an elegant solution. > I' ve read from the list that the > > ctest --build-and-test > > > could be used for that but did not found any example: any suggestion? > The main reason for such a request is that I would like to have targets > that download from CVS,configure and build projects, so to > use the master build phase as a kind of interface to all the tedious > step of grabbibg things from the net, configuring and building. > Are there any examples ? All the CMake tests are run with build-and-test: http://www.cmake.org/cgi-bin/viewcvs.cgi/Source/CMakeLists.txt?rev=1.301&root=CMake&view=markup VTK uses build-and-test to build an examples sub-project in a custom target: http://www.vtk.org/cgi-bin/viewcvs.cgi/Examples/CMakeLists.txt?rev=1.31&view=markup Look near the lines ADD_CUSTOM_COMMAND( OUTPUT ${VTK_BINARY_DIR}/VTKExamples You could also consider making this one big build tree. You can use EXECUTE_PROCESS to run programs to get things from the net and extract the source trees. Then just use ADD_SUBDIRECTORY to include the source trees in your build. A bit more complication may be needed to not get the source over and over. Using IF(FILE_IS_NEWER) may help. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to check/set CMAKE_INSTALL_PREFIX
Eric Noulard wrote: > What is the good way to change the default value of CMAKE_INSTALL_PREFIX > besides the usual: This question has come up several times and I've been deferring a fix until a project-specified initial cache feature is implemented. That feature has been delayed because it is tricky. I've just added a fix to CVS CMake for this. It will be in 2.4.4 (the upcoming patch release). Basically your code needs to know whether the current value of CMAKE_INSTALL_PREFIX was set by the user on the command line or initialized by CMake. Now when CMake initializes the variable it also sets CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT to true. This enables projects to change the default install prefix like this: IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/opt/foo" CACHE PATH "FOO install prefix" FORCE ) ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to check/set CMAKE_INSTALL_PREFIX
Hi all, I want to setup a default value for CMAKE_INSTALL_PREFIX if the user did not indicate a value. so I put: IF (NOT CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/opt/${PACKAGE_NAME}-${PACKAGE_VERSION}" CACHE PATH "Install path prefix" FORCE) ELSE (NOT CMAKE_INSTALL_PREFIX) MESSAGE("CMAKE_INSTALL_PREFIX already set to: ${CMAKE_INSTALL_PREFIX}") ENDIF (NOT CMAKE_INSTALL_PREFIX) but is seems that CMAKE_INSTALL_PREFIX is always set in cache BEFORE I test this :(( What is the good way to change the default value of CMAKE_INSTALL_PREFIX besides the usual: cmake -DCMAKE_INSTALL_PREFIX=/opt/ ../mysource I wanted the cmake run as simple as possible like cmake /path/to/source -- Erk ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] example of ctest --build-and-test
I have the following problem: a master cmake project that wants to configure and build a series of slave cmake projects I' ve tried several hacking but not found an elegant solution. I' ve read from the list that the ctest --build-and-test could be used for that but did not found any example: any suggestion? The main reason for such a request is that I would like to have targets that download from CVS,configure and build projects, so to use the master build phase as a kind of interface to all the tedious step of grabbibg things from the net, configuring and building. Are there any examples ? Thanks in advance ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake