On 2015-05-25 13:06-0700 Alan W. Irwin wrote:
> Don't get me wrong, I would like this limitation to be resolved so
> that our traditional build of the installed examples works as well as
> the CMake build of those. When discussing this with Andrew I
> mentioned one possibility for implementing a fix for this issue, but
> that is a lot of work which I am going to leave to others if they want
> to make our Makefile+pkg-config approach as high quality as the
> CMake-based one for building our installed examples.
There was a question about CMake and C++ this morning on the CMake list
where the reply contained this very useful bit of information:
"Look at CMakeFiles/${CMAKE_VERSION}/CMake*Compiler.cmake for details
of the compiler detected for each language. Look for these variables:
CMAKE_C_COMPILER
CMAKE_C_IMPLICIT_LINK_LIBRARIES
CMAKE_CXX_COMPILER
CMAKE_CXX_IMPLICIT_LINK_LIBRARIES
"
So I did that for my latest build and found
software@raven> grep CMAKE_CXX_IMPLICIT_LINK_
CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
"/usr/lib/gcc/x86_64-linux-gnu/4.7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
So it appears to me that CMake has collected all of its knowledge
about the special libraries associated with any given C++ compiler in
this file. Therefore, I plan to remove the current restriction on our
traditional build system for the installed examples by finding and
parsing this file for the values of CMAKE_CXX_IMPLICIT_LINK_LIBRARIES
and CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES; doing the appropriate
find_library commands to find exact special library locations, and
transforming this information into the -L and -l format required by
our configured pkg-config files.
Anyhow, once I have implemented this change there should be no further
traditional build system concern over linking issues with C++ either
for PLplot 5 or PLplot 6 unless the user is using some exotic C++
compiler that CMake has never heard of.
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
__________________________
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel