Hi Phil: I am adding Werner to the CC list because of the wxwidgets issue you bring up at the end of this.
On 2013-03-03 04:03-0800 phil rosenberg wrote:
As far as LIB_TAG is concerned. It would be good to be able to tag
it. I would like to add suffix d to indicate debug (which would give suffix dd for double debug) which would allow the librarys to be installed in the same place without overwriting. But it's not the biggest issue in the world. In principle, I think our users should be able to put any tag they like (including no tag) on the library names (including the csirocsa and csironn libraries). But I hope others comment here as well.
Regarding static builds I think we have had this discussion before.
There is a significant difference I think between linux and windows and static build on windows can refer to two things. 1) Creating a .lib rather than a .dll. This is what the BUILD_SHARED_LIBS flag does.
2) Linking against the static runtime library. On Windows there is a
.lib version of the runtime libraries and a .dll version. If you link against the .lib version then your resulting .exe will run on any windows machine. If you link against the dll version then a user must install the runtime library on their machine to run your exe. Every library and your exe must be linked against the same version of the runtime library or the linker generates link errors - this can be a real pain to debug. This is what I would like a flag for. I've attached the patch I created which works, but as I'm not very good with CMAKE I'm not sure it's the most elegant solution. CMake makes this distinction between internal and external libraries in general. BUILD_SHARED_LIBS=ON/OFF controls whether internal libraries are built as shared or static. The preference for linking to either the shared or static external versions of libraries is controlled in other ways which unfortunately appear to be a grab bag of different methods. For example, in CMakeCache.txt you will see //Flags used by the linker during the creation of dll's. CMAKE_SHARED_LINKER_FLAGS I haven't tried that myself, but I suggest you try setting that variable to see if it gives you what you need. My guess is it will work when the internal libraries are built as shared, but not when they are static. But please experiment. If the above method does not work for BUILD_SHARED_LIBS=OFF, then another possibility is to set the STATIC_LIBRARY_FLAGS target property. (This is similar to what you attempt to do in your patch, but from a more generalized CMake perspective.) But like your patch this requires fiddling with the build system, and I far prefer that the user set CMAKE_SHARED_LINKER_FLAGS instead if that will work.
While I am emailing just another comment on the wxWidgets work I'm
doing. I'm trying to remove all usage of the plstream internally to avoid race conditions. One hitch at the moment is the plsKeyEH function. Currently this creates a race as the KeyEH function can be set in the main thread and read in the GUI thread at the same time. In particular changing the KeyEH function from non-NULL to NULL at the same time as hitting a key can cause a segfault. The only way to avoid this (as far as I can think) would be to remove the KeyEH function from plstream and delegate it to the interactive devices. This would however require a change to all the interactive devices. Any thoughts? This is beyond my expertise with devices in general and wxwidgets in particular. However, "remove all usage of the plstream internally" doesn't sound like a good way to go from my perspective because that is such a radical departure from the other device driver implementations. It appears from what Werner has already said on list that he is also trying to find a solution for the bugs demonstrated by test.c. So I hope you two get in contact to find a way to do that preferably without any radical departures from what other device drivers do. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________
cmake static runtime.patch
Description: Binary data
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
