From: Alan W. I. <ir...@be...> - 2009-09-10 17:45:40
|
On 2009-09-10 12:33+0300 Tuomas Seppälä wrote: > I used the "-DCMAKE_BUILD_TYPE=" because by default the configure sets > it to debug. I meant to comment on this easy-to-arrive at misconception before. The "d" suffix in our library names has nothing to do with debug. It simply means your build used the default option PL_DOUBLE=ON which makes all PLplot floating point variables double rather than float. I believe PL_DOUBLE=OFF probably still works, but it is rarely tested/used any more, but the d suffix has been there so long for the vast majority of the PLplot builds that our users are used to library names with that "d" suffix. Personally, I don't bother with CMAKE_BUILD_TYPE at all. Instead, I precisely control both the compiler and compile options with the environment variables CC, CXX, and FC, e.g., export CC='gcc' export CXX='g++' export FC='gfortran' to do a very fast build with no optimization or debugging symbols or export CC='gcc -g -fvisibility=hidden' export CXX='g++ -g -fvisibility=hidden' export FC='gfortran -g -fvisibility=hidden' to do a debug build that tests visibility issues on Linux or export CC='gcc -O2' export CXX='g++ -O2' export FC='gfortran -O2' to do an optimized build. In all cases the environment variables are set just before you run cmake for the first time in an initially empty build tree. Unlike, CMAKE_BUILD_TYPE, this method gives you complete control of the exact flags you will use for builds. Regardless of whether you decide to use CMAKE_BUILD_TYPE or the environment variable approach to specify the various build types that you want to do, it's a good idea to keep those builds separate by using a separate build tree AND a separate install tree for each kind of build you decide to 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); PLplot scientific plotting software package (plplot.org); 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 __________________________ |